Advanced bitwise operations and apparatus in a multi-level system with nonvolatile memory

ABSTRACT

A digital system, components and method are configured with nonvolatile memory for storing digital data using codewords. The data is stored in the memory using multiple bits per memory cell of the memory. A code efficiency, for purposes of write operations and read operations relating to the memory, can be changed on a codeword to codeword basis based on input parameters. The code efficiency can change based on changing any one of the input parameters including bit density that is stored by the memory. Storing and reading fractional bit densities is described.

RELATED APPLICATION

This application is a divisional application of copending U.S. patentapplication Ser. No. 12/794,706 filed Jun. 4, 2010, the disclosure ofwhich is incorporated herein by reference.

BACKGROUND

The present application is generally related to multi-level informationsystems and, more particularly, to an apparatus and method relating tobitwise operations in a multilevel system.

U.S. patent application Ser. No. 12/403,546, filed on Mar. 13, 2009entitled BITWISE OPERATIONS IN A MULTI-LEVEL SYSTEM and published onSep. 24, 2009 as U.S. Patent Application Publication no. 2009/0241006 A1(hereinafter the '546 application) is commonly owned with the presentapplication and is hereby incorporated by reference in its entirety.Inasmuch as the '546 application provided what Applicants consider assweeping advantages over the then-existing state of the art, Applicantsconsider that the present application provides still further advantages.

The foregoing examples of the related art and limitations relatedtherewith are intended to be illustrative and not exclusive. Otherlimitations of the related art will become apparent to those of skill inthe art upon a reading of the specification and a study of the drawings.

SUMMARY

The following embodiments and aspects thereof are described andillustrated in conjunction with systems, tools and methods which aremeant to be exemplary and illustrative, not limiting in scope. Invarious embodiments, one or more of the above-described problems havebeen reduced or eliminated, while other embodiments are directed toother improvements.

In general, a digital system is configured with nonvolatile memory forstoring digital data. In one aspect of the present disclosure, anapparatus forming part of the digital system and an associated methodare configured for receiving, using a Reed Solomon encoder, an inputdata stream including input data that is provided through the digitalsystem to produce a Reed Solomon encoded stream that is made up of aseries of Reed Solomon symbols. The Reed Solomon encoded stream isreceived using a packing arrangement for producing a re-blocked outputdata stream such that at least one portion but not all of the re-blockedoutput data stream is configured to be subject to a code efficiencybased on a convolutional code. The re-blocked output data stream ismodified by the packing arrangement to support changes in the codeefficiency of the convolutional code which is associated with apredetermined number of Reed Solomon symbols in the input stream basedon changing one or more values of one or more input parameters that areprovided to the packing arrangement. The re-blocked output data streamis received using a mapping arrangement to apply a TCM (Trellis CodedModulation) code to produce a TCM encoded output data stream. Theportion of the TCM encoded output stream is convolutionally encoded,using a convolutional encoder that forms part of the mappingarrangement, according to the code efficiency of the convolutional codeto support the changes in the code efficiency as based on the values ofthe input parameters to produce a mapped output data stream fordirection to the nonvolatile memory for storage therein as stored data.In one feature, the portion of the TCM encoded output data isconvolutionally encoded as a least significant bit of each one of aplurality of TCM symbols that make up the TCM encoded output streamthrough cooperation between the packing arrangement and the mappingarrangement. In another feature, each TCM symbol is made up of aplurality of bits and the portion of the TCM encoded output data isconvolutionally encoded as at least a least significant bit but lessthan all of the bits of each one of a plurality of TCM symbols that makeup the TCM encoded output stream through cooperation between the packingarrangement and the mapping arrangement. In still another feature, amemory output stream, based on reading the stored data, is received fromthe nonvolatile memory using a demapping arrangement data and isconvolutionally decoded according to the code efficiency to reproducethe TCM encoded output data stream as a demapped output stream based oncorresponding ones of the values of the input parameters as provided tothe mapping arrangement. The demapped output stream is received, usingan unpacking arrangement, to reproduce therefrom the Reed Solomonencoded stream based on the code efficiency in a way that is responsiveto changing the code efficiency of the convolutional code associatedwith the predetermined number of Reed Solomon symbols based oncorresponding ones of the values of the one or more input parameters asprovided to the packing arrangement. The Reed Solomon encoded stream isreceived, using a Reed Solomon decoder, from the unpacking arrangementto decode therefrom a read data stream that includes the input data foruse by the digital system as read data.

In another aspect of the present disclosure, an apparatus forming partof the digital system and an associated method are configured forreceiving, using a block code encoder, an input data stream includinginput data that is provided through the digital system to produce ablock code encoded stream that is made up of a series of block codesymbols. The block code encoded stream is received using a packingarrangement for producing a re-blocked output data stream such that atleast one portion but not all of the re-blocked output data stream isconfigured to be subject to a code efficiency based on a convolutionalcode. The re-blocked output data stream is modified by the packingarrangement to support changes in the code efficiency of theconvolutional code which is associated with a predetermined number ofblock code symbols in the input stream based on changing one or morevalues of one or more input parameters that are provided to the packingarrangement. The re-blocked output data stream is received using amapping arrangement to apply a TCM code to produce a TCM encoded outputdata stream. The portion of the TCM encoded output stream isconvolutionally encoded, using a convolutional encoder that forms partof the mapping arrangement, according to the code efficiency of theconvolutional code to support the changes in the code efficiency asbased on the values of the input parameters to produce a mapped outputdata stream for direction to the nonvolatile memory for storage thereinas stored data.

In another aspect of the present disclosure, an apparatus forming partof the digital system and an associated method are configured forreceiving a Reed Solomon encoded stream, using a packing arrangement, toproduce a re-blocked output data stream such that at least one portionof the re-blocked output data stream is configured to be subject to acode efficiency based on a convolutional code. The packing arrangementand associated method are adapted for changes in the code efficiency ofthe convolutional code which is associated with a predetermined numberof Reed Solomon symbols in the input stream based on given values of oneor more input parameters that are provided to the packing arrangement asan intermediate step preparatory to storing the input data in thenonvolatile memory.

In still another aspect of the present disclosure, an apparatus formingpart of the digital system and an associated method are configured forusing a nonvolatile memory including a plurality of memory cells forstoring digital data. A packing arrangement, forming part of theapparatus, and an associated method are configured for receiving aninput data stream that is provided by the system for producing an outputdata stream that is based on a block size for storage in the memorycells and are selectively operable in a first mode based on one or moreinput parameters to produce a first block size for storage in the memorycells and operable at least in a second mode to produce a second blocksize that is different than the first block size responsive to a changein the input parameters for selectably changing the block size duringoperation thereof.

In still another aspect of the present disclosure, an apparatus formingpart of the digital system and an associated method are configured forusing a nonvolatile memory including a plurality of memory cells forstoring digital data such that at least some of the memory cells canstore more than one bit. An encoder arrangement, forming part of theapparatus, and an associated method are configured to receive an inputdata stream that is provided by the system for producing an output datastream that is based on a selected number of bits per cell coding forstorage in the memory cells and are selectively operable in a first modebased on one or more input parameters to produce a first bit density forstorage in the memory cells as the selected number of bits per cell andoperable at least in a second mode to produce a second bit density thatis different than the first bit density responsive to a change in theinput parameters for selectably changing the number of bits per cellcoding during operation thereof.

In yet another aspect of the present disclosure, an apparatus formingpart of the digital system and an associated method are configured forusing a nonvolatile memory including a plurality of memory cells forstoring digital data such that at least some of the memory cells canstore more than one bit. An encoder arrangement, forming part of theapparatus, and an associated method are configured to receive an inputdata stream that is provided by the system as a series of input symbolsfor producing an output data stream that is based on a selected numberof bits per cell coding for storage in the memory cells and arereconfigurable based on one or more input parameters for changing atleast the selected number of bits per cell coding to be stored in thememory cells of the nonvolatile memory.

In a continuing aspect of the present disclosure, an apparatus formingpart of the digital system and an associated method are configured forusing a nonvolatile memory including a plurality of memory cells forstoring digital data such that at least some of the memory cells canstore more than one bit. A decoder arrangement, forming part of theapparatus, and an associated method are configured for receiving a readdata stream that is provided responsive to reading a data structure thatis stored in the nonvolatile memory to provide a series of read symbols,containing a user data stream originally encoded during a writeoperation as part of the data structure, and stored in a series of thememory cells for reproducing the user data stream based on a selectedone of a number of different bit densities per cell coding as stored inthe series of memory cells. The decoder arrangement and associatedmethod are reconfigurable based on one or more input parameters forchanging at least the selected one of the bit densities to match the bitdensities as stored in the series of memory cells as part of reproducingthe user data stream.

In another aspect of the present disclosure, an apparatus forming partof the digital system and an associated method are configured for usinga nonvolatile memory including a plurality of memory cells for storingdigital data such that at least some of the memory cells can store morethan one bit. A demapping arrangement, forming part of the apparatus,and an associated method are configured for receiving a memory outputstream based on reading the stored data from the nonvolatile memorywhere the memory output stream is in the form of a TCM encoded outputdata stream having one portion but not all of the TCM encoded outputdata stream being subject to a code efficiency that is established bygiven values of a set of parameters during an encoding operation and forconvolutionally decoding the TCM encoded output data stream based on thecode efficiency to reproduce the TCM encoded output data stream as ademapped output stream based on corresponding ones of the given valuesof the input parameters as provided during the encoding operation whichdemapped output stream contains a Reed Solomon encoded stream. Anunpacking arrangement and the associated method are configured forreceiving the demapper output stream and reproducing therefrom the ReedSolomon encoded stream based on the code efficiency and responsive tochanging the code efficiency of the convolutional code associated withthe predetermined number of Reed Solomon symbols based on correspondingones of the given values of the one or more input parameters as providedduring the encoding operation. A Reed Solomon decoder and the associatedmethod are configured for receiving the Reed Solomon encoded stream fromthe unpacking arrangement to decode therefrom a read data stream thatincludes the input data for use by the digital system as read data.

In another aspect of the present disclosure, an apparatus forming partof the digital system and an associated method are configured for usinga nonvolatile memory including a plurality of memory cells for storingdigital data responsive to a host device. An encoder/decoderarrangement, forming part of the apparatus, and an associated method areconfigured to interface the host device with the nonvolatile memory fortransferring read data and write data therebetween in a series ofcodewords with each codeword having a codeword size such that an encodeddata flow from the host device to the nonvolatile memory and a decodeddata flow from the nonvolatile memory to the host device are eachsubject at least to a code efficiency that is based on a convolutionalcode and the encoder/decoder arrangement is configured for receiving oneor more input parameters such that the code efficiency is changeableresponsive to a change in the input parameters on a codeword to codewordbasis. In one feature, each codeword is made up of a plurality ofsymbols to make up a codeword length with each symbol representing avalue to be stored in one of the memory cells and the encoder/decoderarrangement, in conjunction with the associated method, is configuredfor operating in a first mode to produce a first code efficiency in afirst codeword of a given series of codewords and for operating in asecond mode to produce a second code efficiency in a second codeword ofthe given series of codewords.

In still another aspect of the disclosure, in a digital systemconfigured with nonvolatile memory for storing digital data, a datastructure is stored in the nonvolatile memory. The data structureincludes a series of TCM symbols, stored in the nonvolatile memory, eachof which represents at least two bits having at least the leastsignificant bit of each TCM symbol subject to a convolutional code andat least one other bit of each symbol is not convolutionally encoded andthe TCM symbols make up a series of Reed Solomon symbols forming aseries of codewords such that a code efficiency of the convolutionalcode for at least one codeword in the data structure is different fromthe code efficiency of an adjacent codeword in the data structure.

In yet another aspect of the present disclosure, a method is describedfor use with a digital system configured with nonvolatile memory forstoring digital data in a data structure in the nonvolatile memory. Themethod includes writing a series of TCM symbols to the nonvolatilememory, each of which TCM symbols represents at least two bits having atleast the least significant bit of each TCM symbol subject to aconvolutional code and at least one other bit of each symbol is notconvolutionally encoded and the TCM symbols make up a series of ReedSolomon symbols forming a series of codewords such that a codeefficiency of the convolutional code for at least one codeword in thedata structure is different from the code efficiency of an adjacentcodeword in the data structure.

In a continuing aspect of the present disclosure, in a digital systemconfigured with nonvolatile memory for storing digital data, a datastructure is stored in the nonvolatile memory. The data structureincludes a series of TCM symbols, stored in the nonvolatile memory in aseries of memory cells that form part of the nonvolatile memory, witheach TCM symbol including at least one bit and making up a data transferpreviously written to the nonvolatile memory such that, at least onaverage, a fractional number of bits per cell is stored by the series ofmemory cells as representing the data transfer.

In a further aspect of the present disclosure, a method is described foruse with a digital system configured with nonvolatile memory for storingdigital data. The method includes writing a series of TCM symbols as adata transfer to the nonvolatile memory in a series of memory cells thatform part of the nonvolatile memory with each TCM symbol including atleast one bit such that, at least on average, a fractional number ofbits per cell is stored by the series of memory cells as representingthe data transfer. In one feature, the data transfer includes user dataand the method further includes reading the series of TCM symbols fromthe nonvolatile memory based on the fractional number of bits per cellto recover the user data.

In another aspect of the present disclosure, an apparatus forms part ofa digital system configured with nonvolatile memory for storing digitaldata. The apparatus includes a write arrangement for writing, in a datatransfer operation, a data structure to the nonvolatile memory as aseries of TCM symbols in a series of memory cells that form part of thenonvolatile memory, with each TCM symbol including at least one bit andwhich data structure includes user data such that, at least on average,a fractional number of bits per cell is stored by the series of memorycells. In one feature, a read arrangement is configured for reading theseries of TCM symbols from the nonvolatile memory based on thefractional number of bits per cell to recover the user data.

In addition to the exemplary aspects and embodiments described above,further aspects and embodiments will become apparent by reference to thedrawings and by study of the following descriptions.

BRIEF DESCRIPTION OF THE DRAWINGS

Exemplary embodiments are illustrated in referenced figures of thedrawings. It is intended that the embodiments and figures disclosedherein are to be illustrative rather than limiting.

FIG. 1 is a block diagram of a system, produced in accordance with thepresent disclosure, providing for multi-bit per cell storage in a memoryand illustrating certain details with respect to the manner in whichdata can be stored.

FIG. 2 is a diagrammatic illustration of one embodiment of a datastructure that can be stored in the memory of the system of FIG. 1,showing details of the data structure.

FIG. 3 is a block diagram which illustrates one embodiment of aconvolutional encoder that can be used as part of the system of FIG. 1.

FIG. 4 is a block diagram illustrating details with respect to theencoding section of the system of FIG. 1.

FIG. 5 is a flow diagram which illustrates one embodiment of an encodingmethod that is operable by the encoding section of FIG. 4.

FIG. 6 is a block diagram illustrating details with respect to thedecoding section of the system of FIG. 1.

FIG. 7 is a flow diagram which illustrates one embodiment of a decodingmethod that is operable by the decoding section of FIG. 6.

FIG. 8 is a block diagram which illustrates one embodiment of aparameter registers section that can form part of the system of FIG. 1and which can be used by the encoding section of FIG. 4 as well as thedecoding section of FIG. 6, shown here to illustrate details of a bankedconfiguration having multiple register banks.

FIG. 9 is a flow diagram that illustrates one embodiment of a method foroperation relating to the banked parameter section embodiment of FIG. 8.

FIG. 10 is a diagrammatic illustration of another embodiment of a datastructure that can be stored in the memory section of FIG. 1, shown hereto illustrate further details with respect to fractional bit density.

DETAILED DESCRIPTION

The following description is presented to enable one of ordinary skillin the art to make and use the invention and is provided in the contextof a patent application and its requirements. Various modifications tothe described embodiments will be readily apparent to those skilled inthe art and the generic principles taught herein may be applied to otherembodiments. Thus, the present invention is not intended to be limitedto the embodiment shown, but is to be accorded the widest scopeconsistent with the principles and features described herein includingmodifications and equivalents, as defined within the scope of theappended claims. It is noted that the drawings are not to scale and arediagrammatic in nature in a way that is thought to best illustratefeatures of interest. Descriptive terminology may be adopted forpurposes of enhancing the reader's understanding, with respect to thevarious views provided in the figures, and is in no way intended asbeing limiting.

The present disclosure provides what are considered by Applicants asremarkable improvements with respect to the performance of data storageand retrieval systems based on nonvolatile memory. This disclosurerefers to a multi-bit coding system as described, for example, in theabove incorporated '546 application in which two separate groups of bitsare being coded with the two separate groups of bits forming differentportions of each one of a series of, for example, Trellis CodedModulation (TCM) symbols. One group of bits which may be referred to asthe LSBs of each TCM symbol includes at least the least significant bitand may include additional bits of successively greater significance,but not all of the bits of the TCM symbol. Another group of bits, whichmay be referred to as the MSBs, includes all of the remaining bits ofthe TCM symbol other than the LSBs and may include the most significantbit and may include additional bits of successively lesser significancebut not all of the bits of the TCM symbol. In one embodiment, there aretwo MSBs for three bit per cell coding. In another embodiment, there arethree MSBs for four bit per cell coding. Other embodiments are readilyconfigurable by one having ordinary skill in the art with this overalldisclosure in hand.

Performance benefits according to the present disclosure includeincreased storage capacity for a given amount of nonvolatile memory aswell as enhancements relating to the reliability and longevity of thedata storage systems to which the teachings that have been brought tolight herein have been applied. Prior art systems that use, by way ofexample, NAND flash require inclusion of a mechanism to correct errorsthat naturally occur in the memory devices. The present disclosureprovides a powerful error detection and correction mechanism thatunderlies a performance gain relative to prior art systems that employnonvolatile memory. Applicants recognize that error rates in such memorydevices can be quantified as statistical quantities that are predictablefor particular memory devices as a function of device technology, aswell as by environmental and usage statistics. Knowledge of these errorrates and the manner in which they change over the lifetime of a memorydevice can be used to construct error detection and correction systemsthat offer optimal performance for each memory device. Furthermore,Applicants recognize that one may design a generalized error correctionsystem that can be parameterized to operate optimally with each of arange of specific memory devices and to operate with each memory deviceover the lifetime of that memory device.

The present disclosure utilizes encoding and decoding methods involvinga combination of algebraic error correction and Trellis Coded Modulation(TCM) to store and retrieve data with application to non-volatile memorydevices. In one embodiment, the described encoding and decodingtechniques are utilized by a data storage system having a connection toa host computer, encoding and decoding channels, and information storagemedia. The storage media is provided in the form of one or morenon-volatile memory devices which may conform to any suitable technologythat is capable of non-volatile retention of data. Present day datastorage systems that may benefit from the advanced technology describedherein may use NAND flash as the storage medium, but this advancedtechnology is equally applicable with respect to devices based on anyother suitable form of nonvolatile memory either currently available oryet to be developed. Such other forms of nonvolatile member can realizebenefits similar to those seen with NAND Flash.

Non-volatile memory devices usable herein are cell based devices inwhich each cell is capable of storing a unit of information. This unitmay store a single bit or multiple bits. Storage of one bit in anon-volatile memory cell requires a data storage system to reliablyresolve between two possible states in the cell. Storage of more bitsrequires additional states, and the ability to resolve among them. Ifthe amount of data in a cell is resolved in terms of sensed voltages,for example, storage of 2 bits per cell requires resolving among fourdistinct voltages; storage of three bits requires resolving among eightdistinct voltages, and so on. It is submitted that prior art systemshave stored greater than two bits in flash memory only when usingmemories with very high reliability and resolving capability relative tothe number of bits being stored. In other words, the prior art has takenthe approach of attempting to eliminate any possibility of error suchthat any need for correction is all but eliminated. Applicantsrecognize, however, that non-volatile devices such as, for example, NANDflash devices, are imperfect devices. As such, it is difficult whenusing these devices to consistently resolve multiple voltages per cellto such an extent that the benefits attendant to the present disclosureare significant. It should be appreciated that the ability to resolveamong such multiple voltages per cell decreases in proportion to thenumber of voltages and levels that are being resolved. The presentdisclosure makes possible the storage of multiple bits per cell inmemory devices that would, in prior art systems, be incapable ofreliably storing and retrieving the same number of bits per cell. Theapplication of a combination of algebraic encoding and TCM encodingaccommodates Applicants recognition that for storage of multiple bitsper cell, errors are more likely for bits of lesser significance in agiven cell than for bits of higher significance in that same cell. Thisdisclosure presents an exemplary description of a system that stores 4bits per cell. This description, however, is not intended to belimiting. For example, by varying parameters, the same teachings remainapplicable for storing as few as 3 bits per cell, or greater than 4 bitsper cell.

Turning now to the figures wherein like reference numbers may refer tolike components, attention is immediately directed to FIG. 1 which is ablock diagram of a system, generally indicated by the reference number10 in which the system components provide for multi-bit per cell storageand retrieval of data. In system 10, a host computer 12 stores andretrieves data using the storage cells that make up a nonvolatile memory14. Reading and writing is enabled by an encoding section 20 and adecoding section 22, respectively, that reliably conveys data from thehost to the nonvolatile memory and from the memory to the host. Storageof data by the host into the memory is executed in such a way that biterrors occurring when the host reads the data can be identified andremoved from the data by the decoding process before being returned tothe host.

Still referring to FIG. 1, nonvolatile memory 14 can be made up of oneor more individual memory devices each of which may be accessed byencoding section 20, which may be referred to interchangeably as anencoder, or decoding section 22, which may be referred tointerchangeably as a decoder. The device technology for the nonvolatilememory may be any nonvolatile medium capable of storing more than onebit per cell. NAND Flash would be typical, but any non-volatiletechnology would be equally applicable, as discussed above.

Host 12 may be any suitable device that issues read and write commandsto the data storage and retrieval system. It is normally a processor,and may be part of a computer system, but may also be part of anembedded system. Encoder 20 operates during the process of data transferfrom host 12 to memory 14. The function of the encoder is to perform atransformation on data submitted by the host in such a way that errorsmay be detected and corrected when the host requests that it be readfrom memory 14. Decoder 22 operates during the process of data transferfrom memory 14 to host 12. The function of the decoder is to perform atransformation on data that is retrieved from the memory in the formthat the data is stored by the memory and convert the data to the formin which it was originally submitted to the encoder by the host. Theform of the data as stored in memory 14 includes an encoding whichenables decoder 22 to detect and correct bit errors in the data thatoccur because of memory 14 imperfections.

Embodiments that are produced according to the present disclosure canapply to the implementation of the encoder, decoder, and nonvolatilememory, as well as applying to a system environment in which the hostdirects operation by sending commands that result in a transfer of datafor storage into the memory and that result of transfer of data storedin the memory to the host.

Attention is now directed to FIG. 2 which diagrammatically illustratesone embodiment of a data structure that is generally indicated by thereference number 100 and which can be stored in nonvolatile memory 14(FIG. 1) in accordance with the present disclosure. In particular, FIG.2 illustrates a plurality of Reed Solomon (RS) symbols designated asRS1-RS13 that are allocated onto a TCM symbol stream for four bit percell density and for a particular puncture pattern, as yet to bedescribed. It should be appreciated that a Reed Solomon code is one formof a block code. In this regard, any suitable form of block code may beutilized such as, for example, a bitwise BCH code. With this overalldisclosure in hand, one of ordinary skill in the art may readilyimplement other systems, techniques and data structures based on a blockcode such as a bitwise BCH code. Certain ones of the TCM symbols areindividually designated, for example, TCM1, TCM2, TCM3 and TCM15. Thesignificance of the bits for each TCM symbol is designated as b₀ to b₃in which b₀ is the least significant bit. Reed Solomon symbols RS 1, RS7and RS 12 (only partially shown), in an initial portion 102 of the datatransfer, are made up exclusively of least significant bit b_(o) takenfrom the associated TCM symbols. RS2 to RS6, RS8 to RS11 and RS13 (onlypartially shown) are made up of the MSB bits b₁ to b₃. The datastructure is illustrated having initial portion 102 and a terminatingportion 104. TCM symbols TCM1-TCM32 make up initial portion 102 of thestructure including the illustrated portions of RS 1-RS 13. Theterminating portion of the data structure is made up of a group of RSsymbols ending with RS(N) and with a TCM symbol TCM(N′), as will befurther described. It should be appreciated that the data structure ofFIG. 2 corresponds to a particular, but exemplary structure stored inthe nonvolatile memory. Although the number of LSBs may be greater thanone, as described above, FIG. 2 illustrates an embodiment in which threeMSBs (b₁ to b₃) are paired with one LSB (b₀) as taken from each 4 bitTCM symbol. As will be seen, “X” symbols in the LSB positions, as wellas the non-“X” symbols in the LSB positions, represent code bits thatare generated by convolutional encoding prior to actually storing thedata structure in memory. In this regard, the data that is carried inthe “X” bit positions may be referred to as extra code bits. It is notedthat while the present disclosure and the appended claims may refer tothe memory as storing TCM symbols, it should be appreciated that what isactually stored is a level that may be considered as a memory target ortarget level that represents a TCM symbol.

With continuing reference to FIG. 2, the stream of N RS symbols [RS 1,RS2, . . . , RS(N−1), RS(N)] is packed onto a stream of 4-bit TCMsymbols. The term “packing” refers to a process that regroups bits fromone symbol format to another symbol format. In this case “packing”, astream of RS Symbols comprising, for example, 10 bits per symbol onto astream of 4-bit TCM symbols is a process that extracts one bit from thefirst RS symbol for the LSB of the first TCM symbol and three bits fromthe second RS symbol for the MSBs of the first TCM symbol. The secondTCM symbol is constructed from an additional bit from the first RSsymbol for the LSB of the second TCM symbol and three additional bitsfrom the second RS symbol for the MSBs of the second TCM symbol. Inorder to receive all 10 bits of the first RS symbol, 15 TCM symbols arecreated. In the present embodiment, 5 of the LSBs associated with these15 TCM symbols will be X placeholders for convolutional extra code bitswhile 10 of the LSBs are actual data bits making up the first RS symbol.Note that RS6 overruns the end of RS1. Once a current RS MSB symboloverruns the end of a complete LSB RS symbol, the next RS symbol isdedicated as an LSB RS symbol. As the first 30 TCM symbols are createdin FIG. 2, the RS symbols are completed in the order RS2-RS5, RS 1, RS6,RS8-RS 11 and RS7 with RS7 and RS 11 being completed simultaneously atthe creation of TCM 30. Since the creation of the first 30 TCM symbolsare representative of a complete packing pattern, additional TCM symbolsare constructed in similar fashion, taking bits from subsequent RSsymbols as required until all RS symbols have been converted into TCMsymbols. The packing process continues for as long as there are sourcesymbols (i.e. RS Symbols). If the last 4-bit TCM symbol requiresadditional bits to be completed because all bits from the RS Symbolstream have been used up, then additional filler bits are inserted tofill out the last 4-bit symbol. The figure shows the manner in which theN symbols are placed onto the 4-bit stream. Each 4-bit symbol isrepresented by a vertically-arrayed four-bit slice, as shown. Thearrangement order of the bits of each RS symbol onto the TCM symbolstream for encoding purposes can be any convenient order, as long as adecoder can exactly reconstruct the original bit sequence of the symbolduring a cooperating decoding function. The TCM output stream is thesequence [TCM1, TCM2, . . . , TCM(N′−1), TCM(N′)]. Note that an inputstream of RS symbols of length N generates a TCM stream of N′ symbols.The relationship between N and N′ is such that for a given parameter setwhich may include, by way of nonlimiting example, bit-density, RS datalength, RS parity length, a convolutional polynomial to be employed anda puncture polynomial to be employed, a specific value of N produces aspecific value of N′ such that knowing N enables the determination ofN′. Hence, the RS to TCM transformation is exact with respect to thenumber of output bits versus the number of input bits.

It should be appreciated that the first RS symbol in an input stream mayreasonably be allocated to MSBs or to LSBs. The choice between LSBs orMSBs is arbitrary so long as a cooperating decoding function is able toexactly reconstruct the sequence. In the present embodiment, the firstRS Symbol in a stream is always allocated to the LSB side of thestructure on the basis that LSB symbols are consumed more slowly duringthe encoding operation than MSB symbols. Subsequent to the initial RSsymbol, the sequence of RS symbol usage is determined by the particularembodiment. In the configuration shown in the figure, the first RSsymbol (RS1) is chosen as an LSB symbol, and the second RS symbol (RS2)is then an MSB symbol. Subsequent RS symbols are allocated to MSB or LSBbased on rate of usage. In FIG. 2, five RS symbols (RS2-RS6) areallocated to MSBs following placement of the first RS symbol (RS1) asLSBs. After the allocation of RS6 to MSB usage, RS7 is allocated as asecond LSB symbol. The boundary between the first LSB symbol and thesecond LSB symbol in the figure is the boundary between TCM symbolsTCM15 and TCM16. The allocation sequence proceeds in this manner until anumber of symbols equal to an RS data length (where the RS data lengthis the number of RS symbols that make up the complete input data stream)have been used. As will be seen, a system produced according to thepresent disclosure is configured to monitor the incoming RS data streamand appropriately allocate the incoming RS symbols between LSBs andMSBs.

It should be noted that, in FIG. 2, each RS symbol that is used to fillthe MSBs is made up of 10 squares, with each square representing a bit(separated using dashed lines internal to each RS symbol). These bitscorrespond to the 10 bits of the RS symbol length in the statedconfiguration of this symbol. In the LSB positions, however, 15 bitsquares are depicted (instead of ten). The expansion is the result ofadditional or extra code bits that are created by convolutionallyencoding the LSB bit stream and have been added to the LSB RS Symbols,in a manner that is yet to be described. In FIG. 2, the bit boxesincluding an “X” indicate the extra code bits. In the presentembodiment, each LSB RS symbol includes five extra code bits. Thespecific values of the extra code bits is based on the values ofnon-placeholder bits (i.e., the original bits making up each LSB RSsymbol. It is noted that the data structure of FIG. 2 is initiallygenerated prior to convolutional encoding of the LSBs by inserting the Xdesignators as placeholders that are later replaced by the extra codebits. Which bits in each RS LSB symbol are placeholders and how manyplaceholders are inserted, are functions of system parameters definingthe configuration; the most important parameter in this regard is thepuncture polynomial, which designates certain bits that are omitted andwhich additional or extra code bits are included after convolutionalencoding, as will be further described. For the moment, however, it issufficient to understand that the data structure of FIG. 2, in the LSBstream, is required to accommodate more bits than the number of bitscontained just by the associated RS symbols that are fed into the LSBstream.

At the end of an incoming stream of RS symbols with an arbitrary lengthdesignated as an RS codeword length, it may be necessary to insertadditional bits in order to achieve closure of the sequence from a TCMencoding and decoding standpoint when using only the exact number of RSsymbols in the submitted RS codeword. There are two aspects to thisclosure, as will be described immediately hereinafter.

In a first aspect, completing the data structure requires the additionof two bits, b₁ and b₂, at the end of the TCM symbol stream in TCMsymbol TCM(N′) to make up for the fact that the final RS symbol [RS(N)]fills in only bit b₃ of the last TCM symbol. Another situation might beone where the last RS symbol in the LSB position falls short of theboundary demarked by the last bits of the last MSB RS symbol [RS(N)]. Inthis case, additional bits can be filled-in in the LSB position beyondthe end of the last LSB RS symbol in order to provide LSB bits for theterminating TCM symbol(s).

In a second aspect according to the present embodiment, the LSB streamends with a set of consecutive zeros, the number of which is equal to orexceeds one less than a constraint length K of the convolutionalencoder. In the embodiment of FIG. 2, the constraint length may be givenas six because of the five final zeros intermixed with the finalplaceholders in the last LSB symbol. When these consecutive zeros areprovided during encoding, they present a known and non-ambiguoustermination sequence when decoded so as to avoid associated errors fromappearing during the decoding function. To this end, FIG. 2 shows thatthe last five data bits of the LSBs ending at TCM(N′) are zeros. In thisregard, it is assumed that the constraint length K=6, because of therequirement, in the present embodiment, that the last K−1 bits are zero.It should be noted that the five zero bits are consecutive in that thatthey are consecutive data bits. These consecutive data or code bits,however, can be spaced apart by extra code bits, each of which isdesignated using an X, since the extra code bits are additional bitsestablished by the convolutional encoding process responsive to thepre-encode data bits.

FIG. 3 is a block diagram which illustrates one embodiment of aconvolutional encoder that is generally indicated by the referencenumber 300. Through the application of puncturing, the code rate of theoutput of the encoder can be increased. Generally, a convolutionalencoder that uses no puncturing produces two output bits for every inputbit; in this case, the code rate is one half because one definition ofthe code rate is the number of input bits (un-encoded bits) for eachoutput (encoded) bit. It is desirable to reduce the number of outputbits generated by an encoder relative to the number of input bits suchthat the code rate increases. For this purpose, puncturing is applied:all this means is that some of the output bits are removed from theoutput bit stream of the encoder so that the ratio of input bits tooutput bits is increased. This increases the efficiency of the encoder,and if it can be accomplished without excessive loss of bit correctingperformance, the efficiency gain can be a desirable trade-off.

Encoder 300 of FIG. 3 is one embodiment of a programmable single-bitconvolutional encoder. The encoder receives a serial input data stream302 (indicated by a waveform) as a serial progression of single-bitinputs that are presented according to a series of time increments t.This encoder can be programmed for any convolutional code with aconstraint length up to the number of shift register elements plus one.For a given constraint length, the encoder can accommodate anyConvolutional Polynomial Coefficients and Puncture Polynomialcoefficients.

A shift register 304 (shown within a dashed line) is updated with acurrent data bit input at the end of a current time increment whileshifting data bits previously stored in a well known manner according totime increment t. After the shift register is updated, the next datainput in the sequence is presented at the input to the shift register.The shift register is made up of K−1 single-bit wide storage elements,where K is the Constraint Length of the Convolutional Encoder. Thecurrent input state is designated as Dt(0) while the shift registerelements are designated as Dt(1), . . . Dt(K−2), Dt(K−1) to representthe sequential order of receipt. The K−1 register bits along with thecurrent input data bit are used to generate the next output from theencoder.

Stored bits designated as Cb(K−1) through Cb(0), as shown, represent afirst one of two convolutional polynomials. The current input data bit,Dt(0), and shift register 304 contents are combined, as shown, toproduce one of two output values for each input bit. It should beappreciated that FIG. 3 generalizes the use of the convolutionalpolynomial in such a way that any bit combination representing theCoefficients Cb(K−1) through Cb(0) may be programmed as the firstconvolutional polynomial. Each bit of the first convolutional polynomialis provided to a corresponding AND gate 320 such that a value of 1provided to a given one of the AND gates causes that AND gate to pass anassociated input data bit which can be the current bit, Dt(0), or eachdelayed bit, Dt(1) through Dt(K−1), to an Exclusive Or (XOR) 322. Anoutput 324 of XOR 322 corresponds to a first one of the two outputvalues. Conversely, if the given one of the AND gates receives a zerobit as part of the convolutional polynomial, the corresponding inputdata bit (current or delayed) will not contribute to the determinationof an output bit by XOR 322. In one embodiment, Cb(K−1) through Cb(0)can be stored in a register. These register values can be written aspart of an overall configuration before operating the convolutionalencoder. XOR 322 combines the outputs from logical AND functions 320.Again, the value produced by logical XOR function 322 is one of the twoencoded bits produced for each Dt(0) by the convolutional encoder.Whether this result bit is inserted into the output data stream (Eoutb)depends on whether the bit is enabled or inhibited by a puncturingfunction that is yet to be described.

Similarly, stored bits labeled Ca(K−1) through Ca(0), as shown,represent the second convolutional polynomial. As is the case with thefirst convolutional polynomial, any bit combination representing theCoefficients Cb(K−1) through Cb(0) may be programmed as the secondconvolutional polynomial. Each bit of the second convolutionalpolynomial is provided to a corresponding AND gate 330 such that a valueof 1 provided to a given one of the AND gates causes that AND gate topass an associated input data bit which can be the current bit, Dt(0),or each delayed bit, Dt(1) through Dt(K−1), to an XOR 332. An output 334of XOR 332 corresponds to a second one of the two output values.Conversely, if the given one of AND gates 330 receives a zero bit aspart of the convolutional polynomial, the corresponding input data bit(current or delayed) will not contribute to the determination of anoutput bit by XOR 332. In one embodiment, Ca(K−1) through Ca(0) can bestored in a register. These register values can be written as part of anoverall configuration before operating the convolutional encoder.Current input data bit Dt(0) and shift register 304 contents arecombined with these values, as shown, to produce the second output valueusing AND gates 330 and XOR 332 for each input bit Dt(0). XOR 332combines the outputs from logical AND functions 330. Again, the valueproduced by logical XOR function 332 is the second one of the twoencoded bits produced for each Dt(0) by the convolutional encoder.Whether this result bit is inserted into the output data stream (Eouta)depends on the puncturing function that is yet to be described.

In the present embodiment, the puncturing function is performed by apuncture pattern counter section 338 (shown within a dashed line) usinga first puncturing shift register 340 (shown within a dashed rectangle)and a second puncturing shift register 342 (shown within a dashedrectangle). First puncturing shift register 340 contains thecoefficients of a first puncture polynomial designated as Pa(x). Therepresentation of Pa(x) as a function of “x” illustrates the fact thatvalues comprising Pa(x) are ordered relative to the data stream. Eachcoefficient value is made up of a single bit and the number of bitsmaking up Pa(x) is equal to constraint length K. It is recognized thatequivalence of constraint length and puncture pattern length isexemplary to FIG. 3; embodiments may choose puncture patterns of greateror less length. Regardless of length, cyclic application of the puncturepatterns is as described. In the programmable embodiment shown in thefigure, the number of bits used for shift register 340 is the same asthe value of K, and is therefore determined by the configuration of theconvolutional encoder. Shift register 340 is updated for each timeincrement t of serial input data stream 302. Before the first serialdata input is received, shift register 340 is initialized with the valueof Pa(x) in such a way that a left-most shift register location 344 isloaded with the most significant bit in Pa(x) and a right-most shiftregister location 346 is loaded with the least significant bit in Pa(x).After the input data stream begins, puncture shift register 340 isincremented after each time increment: there is a bit-wise left to rightmovement of the contents of the shift register, and at the same time,the contents of the least significant shift register bit is transferredto the most significant bit of the shift register (this is an end-aroundshift of the least significant shift register bit). In this way, thevalue of Pa(x) is used one bit at a time in control of a first outputswitch function 350. The value of Pa(x) continues to cycle for as longas data is received by the convolutional encoder. The most significantbit in shift register 340 is always used as a control for puncturing asprovided to output switch 350. If the most significant shift registerbit is a logical “1”, then the output of XOR function 332 is insertedinto output stream Eouta. If, on the other hand, most significant shiftregister bit 344 is a logical “0” then XOR output 332 is inhibited(punctured) from entering output stream Eouta.

The puncturing function is further performed using second puncturingshift register 342 in a manner that reflects the operations relating tofirst puncturing shift register 340. The descriptions of theseoperations, therefore, may not be repeated in their entirety forpurposes of brevity. Second puncturing shift register 342 contains thecoefficients of a second puncture polynomial designated as Pb(x). As isthe case with Pa(x), the representation of Pb(x) as a function of “x”illustrates the fact that values comprising Pb(x) are ordered relativeto the data stream. Each coefficient value is made up of a single bitand the number of bits making up Pb(x) is equal to constraint length K.Further, before the first serial data input is received, shift register342 is initialized with the value of Pb(x) in such a way that aleft-most shift register location 360 is loaded with the mostsignificant bit in Pb(x) and a right-most shift register location 362 isloaded with the least significant bit in Pb(x). After the input datastream begins, puncture shift register 342 is incremented after eachtime increment. Shifting takes place in essentially the same manner asdescribed with respect to first puncturing shift register 340 such thatthe value of Pb(x) is used one bit at a time in control of a secondoutput switch function 364. The most significant bit in shift register342 is always used as a control for puncturing as provided to secondoutput switch 364. If the most significant shift register bit is alogical “1”, then the output of XOR function 322 is inserted into outputstream Eoutb. If, on the other hand, most significant shift register bit344 is a logical “0” then XOR output 332 is inhibited (punctured) fromentering output stream Eoutb. It should be appreciated that first andsecond output switches 350 and 364 are diagrammatic representations ofswitching functions that can be implemented in any suitable manner suchas, for example, in software, hardware or any suitable combinationthereof by one having ordinary skill in the art with this overalldisclosure in hand.

It should be noted that the described puncturing process relating toFIG. 3 can result in a variability in the number of outputs generated ateach time increment. For example, if the most significant bits inregister locations 344 and 360 are both logical “1” then two bits willbe added for the current time increment. If, however, one of these bitsis logical “1” and one is a logical “0”, then only one bit will be addedfor the current time increment; and if both bits are a logical “0” thenno output bits will be added for the current time increment. The actionof puncturing constrains the size of the output stream relative to theinput stream such that the largest possible expansion for the encoder is2:1 for the unpunctured case in which all bits of Pa(x) and Pb(x) are“1”). The output stream size decreases with increasing numbers of “0”values in Pa(x) and Pb(x). Generally, implementations of theconvolutional encoder utilize some expansion of the output streamrelative to the input stream in order for a desired error correctionbehavior to occur during decoding. One useful expansion ratio is 3:2,and this is the case illustrated in FIG. 2 where each RS LSB symbolcontains 15 bits instead of 10. The added “X”s in the LSB symbols inFIG. 2 illustrate this expansion in the TCM symbols.

FIG. 4 is a block diagram which illustrates one embodiment of encodersection 20 of FIG. 1. It is noted that lines that support data flowbetween component blocks have line thicknesses that vary in proportionto the number of bits transported by each line along with numericaldesignators within the constraints of the figure. It should beappreciated that encoder section 20 implements the stored data structureof FIG. 2. In this regard, FIG. 4 is consistent with FIG. 2 byimplementing four bits per cell storage in nonvolatile memory 14, by wayof nonlimiting example. For purposes of creating the data structure ofFIG. 2, as will be seen, encoder 20 produces pre-encode TCM symbols froman input stream of RS symbols. Generally, in the 4-bit per cellconfiguration, each pre-encode TCM symbol is made up of four bits. Thesebits, in turn, are comprised of one LSB and three MSBs. In some cases,the LSB may be a placeholder, X, that is inserted preparatory to laterconvolutional encoding such that the placeholder is later filled by anextra code bit. It is noted that the convolutional encoding processreplaces both placeholders and pre-encode data bits with extra code bitsand code bits, respectively. As noted, the pre-encode TCM symbols arelater encoded by a mapping function for MSBs and convolutional encodingfor the LSB. In each pre-encode TCM symbol, the three MSB bits areencoded by a mapping function that transforms the three-bit field to itsencoded form. The LSB bit is added to a convolutional encoder inputstream and replaced by the next bit from the convolutional encoder'soutput. During the LSB bit creation function, placeholder fields, X, areinserted according to the puncture pattern selected for theconfiguration. These placeholder fields are later replaced by bits fromthe convolutional encoder during the convolutional encoding processwhich is applied to the pre-encode LSBs.

In view of the need for cooperation between an encoder section and adecoder section, it should be appreciated that a given decoderimplementation may impose limits on the ranges of some controllingparameters such that the given decoder is capable of supporting someencoding configurations (for example, the number of bits per cell), butnot others. In some embodiments, a particular decoder may be designed totarget specific configurations and to disregard others. For example, adecoder may support three bit per cell and four bit per cell densitysettings, but not five or more bit per cell density settings.Functionality that differs in this way from one decoder design toanother represent embodiments which are all considered to fall withinthe scope of the present disclosure since each embodiment neverthelessincludes a common approach to error correction.

Referring to FIG. 1 and prior to continuing the detailed description ofFIG. 4, it is noted that information moving from one system sub-block toanother is generally organized as streams of symbols. In the progressionfrom host 12 to NV memory 14 and in the reverse direction from NV memory14 to host 12, data passes through various representations from userdata form through Reed Solomon symbols, then intermediate symbols thatculminate in NV memory cell targets during the encoder function, andfrom NV memory cell targets back to user data form during the decoderfunction. In both the encoder and decoder functions, data at each steppasses from its generation to its consumption as an ordered stream ofsymbols, with each stream comprising a specific number of symbols.

Attention is again directed to encoder 20 of FIG. 4. A Reed Solomon (RS)encoder 402 receives user data 404 that is provided to the encoder byhost 12 (see FIG. 1). Normally, user data 404 can be a specific quantityof 8-bit units (bytes) having an ordered relationship to one another.The user data may be organized according to other bit quantities whilereadily remaining within the purview of the teachings that have beenbrought to light herein. Accordingly, the user data may be discussedhereinafter as consisting of bytes while recognizing that the use of anyother suitable units would have no substantive influence onimplementation by one having ordinary skill in the art. The quantity ofuser data units for any encoding operation is a parameter used by theencoder and is applied to the operation of RS encoder 402. In oneembodiment, the quantity of user data units (user data length) isprogrammed into a register as depicted by a parameter registers section410. If RS symbol units have a different number of bytes than user datain the form of bytes, the user data bytes are converted to a set of RSsymbols before the RS encoder may operate on them. The exemplary form ofRS unit (symbol) presented in this disclosure is 10 bits, though otherRS unit sizes are possible and remain within the scope of the teachingsherein. User data to RS symbol conversion, in the present example, is asimple conversion of bytes to 10-bit symbols; in effect, thepost-conversion result yields four RS symbols (4×10 bits) for every fiveuser data bytes (5×8 bits). Since any given number of user data bytesmust be convertible to an integer number of RS symbols, some “don'tcare” bits may be inserted into the final symbol of the RS result. Thenumber of RS symbols (termed the “RS data length”) resulting from userdata to RS conversion is an additional parameter programmed intoparameter register section 410 by a microprocessor or CPU 412. As shown,runtime RS data length 414 is a runtime input to the encoder. Inparticular, RS data length 414 is provided to an RS counter 420.Normally, the value of runtime RS data length 414 is sourced from thevalue of RS data length stored in parameter registers section 410. Theconnection between the runtime RS data length and the RS data lengthstored in parameter registers section 410 may be direct or indirect(modified), which ever is most appropriate in a particular embodiment,as will be further described.

It should be noted that RS Encoder 402 and Convolutional Encoder 300both expand the size of data they encode as a necessary part of theencoding functions they perform. This expansion is incurred by theaddition of redundant information that will subsequently be used by thedecoding process to remove errors that might have been incurred.Encoding by RS encoder 402 adds RS parity symbols, while encoding byconvolutional encoder 300 adds additional bits to the encoded bitstream. Code efficiency as used in this disclosure is a measure of thisredundancy against the amount of user data being stored and retrieved.Code efficiency may be interpreted as a relative value that is generallybetter for lower amounts of redundancy and worse for higher amounts ofredundancy. One empirical measure of code efficiency may be taken as aratio of the total number of bits in a unit of user data to the totalnumber of bits produced by the encoder of FIG. 4 in the encoding thatunit of user data. As a simple example, consider a user data unit of 512bytes (4096 bits) encoded by an encoding function that expands the 4096input bits by 600 bits. The 600 bits is redundancy added to the 4096information bits. The code efficiency is then 4096/(4096+600), or 87.2%.Various empirical measures are used by those having ordinary skill inthe practical arts to measure code efficiency. One of these that hasbeen previously discussed in this disclosure is code rate.

It should be further appreciated that in at least some embodiments, codeefficiency can be varied. The effect of better code efficiency, ascompared to a relatively lower code efficiency, is generally thedifference between lower error correction capacity and higher errorcorrection capacity. respectively. Coding configurations are defined bya set of programmable parameters as will be subsequently described, andvalues of these programmable parameters can be adjusted so as to yielddiffering code efficiencies. The values in parameter registers 410 areall determinants to a greater or less extent of code efficiency, hencecode efficiency is a configuration attribute that may be adjusted, ifnecessary, on a codeword to codeword basis.

RS data length is the number of RS symbols constructed from a set ofuser data symbols (usually bytes) that is User data length units long.FIG. 4 User data symbols may each be taken to be 8 bits wide, and eachRS symbol may be taken to be 10 bits wide. Therefore the conversion ofUser data length 8-bit symbols to RS data length RS symbols each 10-bitswide is the multiplication of User data length by 8/10. If a fractionalRS unit (i.e., less than 10 bits) remains after performing thismultiplication, the fractional part is rounded out to 10 bits by addingwhatever number of bits is necessary to bring the last symbol length to10 bits. Hence, RS Data length may, in some embodiments be deriveddirectly from the User Data Length. In other embodiments, the RS DataLength may be implemented as an independent register value. Either formof embodiment can be appropriate.

RS encoder 20 uses RS symbols resulting from user data 404 andcalculates an additional set of symbols called parity symbols. Theparity symbols are an additional ordered set of RS symbols of length “RSparity length” which are appended to the RS symbols obtained from theuser data conversion. The value of the RS parity length is normallyavailable from parameter registers section 410. The resultingcombination of the user data symbols and the parity symbols is termed asan RS codeword. The length of the RS codeword is a system parameterwhich may be available in parameter registers section 410 but may alsobe available as a simple sum of the values RS data length and RS paritylength which are also available in parameter registers section 410. Theterm “RS codeword” has a specific meaning when used in the context ofReed Solomon encoding and decoding; it is also well understood bypractitioners of the related disciplines and so details on the theory ofReed-Solomon coding will not be generally repeated for purposes ofbrevity [See, for example, Wicker, Stephen B., Error Control Systems forDigital Communication and Storage, 1995, Prentice-Hall pp. 238-239]. Thecodeword length is used by the encoder to complete the encodingoperation. It is noted that the RS parity length is proportional to theamount of redundancy added by the RS encoder and is determined from aparameter called “T” which is a targeted symbol correction capacity.Generally, for a given RS codeword with a given symbol correctioncapacity, the system is able to correct up to a certain number of RSsymbols in that RS codeword. Increasing the value of T results in thecapability to correct additional RS symbols in the codeword. The RScodeword is the output from RS encoder 402. The parameters of RS datalength, RS parity length, and RS codeword length are used by componentsthat subsequently receive the RS encoder result.

Referring to FIG. 2 in conjunction with FIG. 4, a multiplexer 424directs RS symbols emerging from RS Encoder 402 to one of two paths: anMSB path 426, or an LSB path 428. Having completed the process of RSencoding, encoder 20 is configured to then format the data stream forTCM and convolutional encoding. For different encoding embodiments, thearrangement of the RS symbol input stream relative to the TCMrequirements results in RS symbol allocation to the LSB section and theMSB section in different proportions, as seen in data structure 100 ofFIG. 2. That is, a far greater number of RS symbols is allocated to theMSB path as compared to the number that is allocated to the LSB path. Inthe embodiment of FIG. 2, RS Symbols are allocated to TCM encoding for10-bit RS Symbols in a four-bit-per-cell case. Two counters, an MSBcounter 430 and an LSB Counter 432 determine the destination for eachincoming RS symbol as between MSB path 426 and LSB path 428. In general,the states of the MSB counter and the LSB counter determine whetheranother RS Symbol is required, and if so the destination (MSB side orLSB side) to which the symbol is directed. If states of both MSB and LSBcounters indicate that another RS Symbol is required, an RS Symbol istaken for the LSB side first, and an RS Symbol for the MSB side is takensecond. More particularly, whether a particular RS symbol becomes partof the MSB encoding or the LSB encoding is determined by an MSB/LSBsequence pattern that can be derived from (i) a set of encodingparameters including, for example, RS symbol width, (ii) aspects of theTCM convolutional encoding, (iii) the puncture polynomials and (iv) bitdensity, to be further described. Based on the sequence pattern, the MSBand LSB counters are used as each RS Symbol value becomes available tosupply either an MSB Buffer 440 or an LSB Buffer 442.

MSB counter 430 tracks the number of bits in MSB buffer 440. The MSBcounter is initialized to zero before the first RS symbol is taken fromRS encoder 402. The MSB counter, in the present embodiment, incrementsby 10 for the first RS symbol and for each additional RS symbol takeninto the MSB Buffer. The MSB counter decrements by three for each 3-bitfield that is transferred out of the buffer to continue along MSB path426. When the MSB buffer is at a count that is less than three, or logicdetects that it will decrement to zero on the next use cycle, the nextRS symbol is taken from the input stream for allocation to the MSB pathand the counter value is incremented by 10.

LSB counter 432 tracks the number of bits in LSB buffer 442. The LSBcounter is initialized to zero before the first RS symbol is taken fromRS encoder 402 and increments by 10 for each additional RS symbol takeninto the LSB buffer. The LSB counter decrements by 1 for each bit thatis transferred out of the buffer to continue on LSB path 428. When theLSB counter decrements to zero, or logic detects that it will decrementto zero on the next use cycle, the next RS symbol is taken from theinput stream for allocation to the LSB path and the counter value isincremented by 10. In situations when both MSB counter 430 and LSBcounter 432 enter states that simultaneously request another RS symbol,the next RS symbol is taken by priority into the LSB buffer with asubsequent RS symbol allocated to the MSB buffer.

MSB buffer 440 receives RS symbols directed to this section frommultiplexer 424. The symbols are written to this buffer for subsequentusage in MSB encoding path 426. In the exemplary embodiment of afour-bit per cell configuration, as depicted, bits in MSB buffer 440 areconsumed 3-bits at a time, i.e. on each use cycle an additionalpre-encode TCM symbol is created that takes 3 bits from the MSB bufferthat are used as the 3 MSBs of the next TCM Symbol while one LSB bit istaken from the LSB buffer. In the event that a placeholder is to beinserted, however, a bit is not taken from the LSB buffer. Again, thisembodiment is exemplary since other configurations can be applied to thesame encoder by altering controlling parameters. By way of example, a 3bit per TCM symbol embodiment can be programmed in which MSB bufferconsumption is at the rate of two bits per TCM Symbol instead of three.

An output 446 from the MSB buffer is a three bit value for every TCMsymbol. MSB groups of three bits are exemplary to this figure. Someembodiments may employ this value, as well as other values. For example,a 3 bit per cell bit density setting may have a 3 bit TCM symbol inwhich there is one LSB bit and 2 MSB bits per TCM symbol. Other TCMsymbol formats with variations in both MSB width and LSB width arerecognized. MSB buffer output 446 is part of the data path that entersthe encoding logic which is yet to be described. The MSB bits are inputsto an MSB mapping function 450, yet to be described.

LSB buffer 442 receives RS symbols from multiplexer 424 and are writtento the LSB buffer for subsequent usage in LSB encoding path 428. In thedepicted four-bit per cell embodiment, bits in the LSB buffer areconsumed at the rate of less than one bit per TCM symbol as a result ofconvolutional encoding that is to be applied. Since convolutionalencoding has not been applied as the TCM symbols are being generatedusing MSB path 426 and LSB path 428, the TCM symbols at this stage maybe referred to as pre-encode symbols. Creation of some pre-encode TCMSymbols requires extraction of a bit from the LSB Buffer, and some ofthe pre-encode TCM Symbols require no additional LSB buffer bit since aplaceholder bit is being inserted at this juncture rather than a bitthat is based on the user data. The reader will recall that theseplaceholder bits can be represented by the symbol X in the LSB RSsymbols of FIG. 2 and that these placeholder bits are later replaced byextra code bits, produced by convolutional encoding, as part of datastructure 100. As will be described in detail below, puncture polynomialpatterns control selection between an LSB Buffer bit or a placeholderbit in a sequence of TCM Symbols.

As discussed above, an LSB symbol bit is taken from the LSB Buffer oneor zero bits per cycle and asserted to LSB path 428. For purposes of thepresent discussion, the term “block” corresponds to the value ‘Number ofTCM Symbols’ stored at 414. As an end of block assurance that aconstraint length of zeros are the final LSBs of a block, a limitcomparator 454 and limit logic 456 force these bit values to zerosduring the final K bits of the block, where K is the constraint lengthof the convolutional code to be applied, as discussed above with regardto FIG. 2. In particular, the LSB bits for TCM symbols TCM(N′),TCM(N′−2), TCM(N′−3), TCM(N′−4) and TCM(N′−6) are forced to zero in FIG.2.

MSB mapping function 450 receives the MSBs on MSB path 426 and canconvert MSB bit patterns from an un-encoded representation, as received,to a representation that is intended to reduce the number of bitfailures that may occur in the event of errors taking place onread-back. In one embodiment, the mapping is a conversion from a Graycode representation to a binary representation. It is noted thattreating the incoming data as Gray coded is optional. Further, it shouldbe appreciated that any suitable, reversible mapping function can beemployed and the use of Gray coding is described by way of non-limitingexample. Mapping function 450 receives MSBs in groups (groups of threein the present embodiment) and generates an output 462 for each groupthat is made up of the same number of bits. Output 462 is concatenatedwith a corresponding LSB generated by aforedescribed convolutionalencoder 300 and forwarded to a level to digital to analog converter(DAC) 472. The LSB can be a bit that is responsive to the user data or acode bit in an X position as shown in the RS LSBs of FIG. 2 anddescribed above.

Referring to FIG. 3 in conjunction with FIG. 4, convolutional encoder300 can receive a current LSB bit from LSB buffer 442 by way of limitlogic 456. The convolutional encoder acts on the LSBs as they arereceived, one bit at a time. Encoding is subject to various parametersthat are inputs to convolutional encoder 300. These parameters includeconvolutional polynomials where the constraint length may itself be aparameter, and puncture polynomials. In a system with a single LSB, perthe present embodiment, there are normally two convolutional polynomials(see Ca(0)-Ca(K−1) and Cb(0)-Cb(K−1) in FIG. 2) and two puncturepolynomials (stored, for example, as Pa(x) and Pb(x) in FIG. 2). Valuesof each of these polynomials may vary with a given embodiment. In asystem that incorporates more than one LSB, there are additionalconvolutional and puncture polynomials required as parameters. In someembodiments, these parameters may be programmed into registersassociated with the convolutional encoder by system microprocessor 412as directed by firmware 480 that is executed by the microprocessor.

Referring to FIG. 4, an input 482 of level to DAC converter 472 receivesthe MSB group and an associated LSB for each TCM symbol. The encoded LSBand MSB streams are available from convolutional encoder 300 and MSBmapper 450, respectively. These two resultant data streams are mergedwith the effect that the stream of TCM symbols is now complete at input482 of converter 472. The data path widths in this figure are exemplarywith respect to the fact that 3 bits for the MSBs and 1 bit for the LSBis shown; other configurations are possible with respect to both MSBsand LSBs. Greater or fewer than 3 MSBs may be included with each TCMSymbol, and greater than 1 LSB bit per TCM symbol may be included. Anoutput 484 of the level to DAC is directed to NV memory 14 of FIG. 1.Level to DAC 472 may perform a final adjustment to each TCM Symbolaccording to parameters that have to do with requirements relating tothe analog value of the data bits that will be written into each NVmemory cell. For example, the adjustment may involve the application ofan offset value to the TCM Symbol and/or the adjustment may also be ascaling transformation that either compresses or expands the TCM Symbolvalue relative to a cell target range. Level to DAC 472 can becontrolled by parameters in parameter registers 410 that are programmedby microprocessor 412 in cooperation with system firmware 480.

Attention is now directed to additional details with respect to RScounter 420. This counter can be initialized with runtime number of RSsymbols 414 that is to be presented from RS encoder 402. The valuestored as the runtime number of RS symbols can be up to an entirecodeword or longer, where the codeword is an RS codeword or someintegral number of RS codewords. If interleaving is employed, the numbercan be an integral number of codewords implied by the interleavingfactor stored in parameter register section 410. RS symbol counter 420decrements by one for each RS Symbol received by multiplexer 424. Theend of the RS block, where the term “RS block” corresponds to the valueof the runtime number of RS symbols, for purposes of the presentdiscussion, is indicated when the RS counter decrements to zero tosignal the end of the current transfer. In particular, LSB limit 490 isa constant, and is compared with the value in RS counter 420. The RScounter initially starts out as a value greater than LSB limit 490.Since the RS counter decrements with each RS symbol that is transferred,the value stored by the RS counter eventually decrements to the pointwhere it becomes equal to the LSB limit count, as determined by RS/LSBlimit comparator 454. Zeros are inserted/stuffed at the point when theRS count becomes less than the LSB limit. As described above, the zeroesare stuffed as LSBs of the pre-encode TCM symbol stream to form part ofdata structure 100 (FIG. 2) for purposes of indicating the end of thedata structure in memory.

As described above, runtime RS length input 414 may be provided fromparameter registers 410. The value of the runtime RS length input can beused to initialize RS symbol counter 420 prior to sequencing through auser data input sequence. The value denotes the number of RS symbolsthat RS encoder 402 will produce by RS encoding the user data stream.

Puncture pattern counter 486 is initialized with a value from a runtimepuncture pattern input 488 prior to a user data stream entering encoder20 and implements puncture pattern counter section 338 of FIG. 3.Pattern input 488 may store first and second puncture polynomialsobtained from parameter registers section 410. Puncture pattern counter486 controls placeholder bit generation (the X positions in the RS LSBsymbols of FIG. 2) in the generation of the LSB stream making uppre-encode TCM symbols. The puncture pattern is a bit pattern with alength that, in FIG. 2, is the same as the constraint length ofconvolutional encoder 300, however, other embodiments may use a puncturebit pattern length larger or smaller than the constraint length.Puncture pattern counter 486 is preset with puncture pattern valuesprior to handling a stream of user data symbols. As described above withregard to puncture pattern counter section 338 of FIG. 3, puncturepattern counter 486 rotates the value of the puncture patterns by onebit position for each TCM symbol that is created so that the samepuncture pattern counter bit position (i.e., the leftmost bits for Pa(x)and Pb(x) in FIG. 3) is always applied to the current encoding. Sincethe convolutional encoder, in the absence of puncturing, generates twooutput bits for each input bit, the addition of puncture patternsreduces this ratio to something less than two to one. The puncturepattern counter controls whether the LSB of each pre-encode TCM symbolis an expansion bit (placeholder X) or a bit from the input LSB stream.The puncture pattern counter provides an output to convolutional encoder300 as well as to LSB Buffer 486 such that the puncture pattern counterand the LSB Buffer cooperate for purposes of generating placeholders inthe LSB path at the output of the LSB Buffer.

RS/LSB limit comparator 454 comes into play at the end of an RS block ofTCM encoding where it is necessary to assert the final K−1 LSB bits ofthe pre-encoded TCM Symbol stream to zeros (where K is the constraintlength of the convolutional encoder), as seen by way of example in FIG.2 and described above. The LSB limit count is obtained as an LSB limitvalue 490 and is compared with the count of RS symbol counter 420 on atime increment by time increment basis to provide an indication of whento force the pre-encode LSB stream to zeros. This allows convolutionalencoder 300 to encode a known closing sequence into the encoded TCMsymbol sequence with the result that upon decoding, end of RS blockclosure bit decoding errors are avoided. LSB limit value 490 can begenerated, for example, from the convolutional constraint length inparameter registers section 410 and may be applied as an initial valueprior to processing a stream of user data using RS/LSB limit comparator454.

A TCM counter 492 is initialized prior to encoding a user data symbolstream. This value corresponds to the number of TCM symbols that willresult from encoding an entire user data stream according to the set ofconfiguration parameters as reflected by parameter registers section410. The TCM symbol count is itself one of the configuration parameters.The TCM counter can be initialized from a TCM block count input 494. TheTCM counter value controls the sequencing of the TCM encoding andprovides an end of TCM block criterion for the termination of eachsequence of TCM symbols. As a parameter value, the TCM symbol count canbe calculated from other configuration parameters and represents theexact number of TCM symbols produced from a user data stream of specificlength according to the set of configuration parameters. The TCMcounter, for example, provides the end of sequence criterion to CPU 412.The TCM counter provides a measure of the exact number of symbols to bepassed in a particular transfer. This counter may be initialized withthat number and count down to zero, or the counter may be initiallycleared and count up to the anticipated value. Either way, the TCMcounter provides an end of sequence signal to the system.

TCM block count input 494 is driven from the value of TCM codewordlength that is provided in parameter registers section 410 and suppliesa TCM block count value with which TCM counter 492 is initialized priorto encoding a user data symbol stream.

Limit logic 456 is controlled by RS/LSB limit comparator 454, asdescribed above, and either allows pre-encode LSBs from the LSB bufferto pass unmodified to the Convolutional Encoder, or selectively forcesthe convolutional encoder input LSBs to zeros in the zero stuffingprocedure that is described above for purposes of providing an end ofsequence indication for terminating an overall RS symbol transfer. Forpurposes herein, it is noted that the components following the output ofReed Solomon encoder 402 up to and including MSB Buffer 440 and limitlogic 456, and associated components, may be referred to as a packingarrangement 496. Components including mapper 450, convolution encoder300 and associated components may be referred to as a mappingarrangement 498. The packing arrangement may be referred to as producinga re-blocked output data stream such that at least one portion but notall of the re-blocked output data stream is configured to be subject toa code efficiency based on a convolutional code. Moreover, the packingarrangement is adapted to modify the re-blocked output data stream tosupport changes in the code efficiency of the convolutional code whichis associated with a predetermined number of Reed Solomon symbols in theinput stream based on changing one or more values of one or more inputparameters that are provided to the packing arrangement.

Referring to FIGS. 1 and 4, microprocessor/CPU 412 can be provided inany suitable form such as, for example, in the form of an embeddedcontrol with the processor being dedicated to operating encoder 20,decoder 22 (FIG. 1) and NV memory 14 (FIG. 1) under direction from host12 (FIG. 1) and serves as an execution platform for firmware 480.Firmware 480 is the software component of one embodiment using anembedded controller. The firmware implements control of encoder 20 (FIG.1), decoder 22 (FIG. 1) and NV memory (FIG. 1) under direction from host12 (FIG. 1).

Referring to FIG. 4, parameter registers section 410 can constitute agroup of registers accessible by microprocessor 412 under control offirmware 480. The values stored in these registers act to defineencoding configurations and control the action of the encoder via CPU 20and firmware 480 or via registers that are directly accessible to somecomponents of the encoder. It is noted that some of the registerparameters have been described in the context of the discussions above.For purposes of providing still further clarity, however, parameterregister section 410 will be described in additional detail immediatelyhereinafter.

Parameter values shown in parameter registers section 410 of FIG. 4 arefurther described as follows:

User Data Length: The length (in bytes) of a user data block or unitlength of user data. By way of non-limiting example, suitable User DataLengths include 512 bytes, 1024 bytes, or any other suitable length thatis supported by a particular embodiment of encoder/decoder.

RS Correction Capacity: Also referred to as “T”, defines a maximumnumber of RS symbols that the RS error correcting code is capable ofcorrecting in a single codeword. This value multiplied by two definesthe number of parity symbols in each RS codeword.

RS Data Length: The length of a user data block after it has beenconverted from bytes to RS symbols. As such, there is a directrelationship between the user data length and the RS data length.However, because bits must be added to the converted RS symbol stream ifthe user data stream does not map into an integral number of RS symbols,the RS data length is normally maintained in the parameter registerssection as an independent value.

RS Parity Length: The number of RS parity symbols appended to RS datalength in order to construct a single RS codeword. The value of RSparity length is directly implied by the value of RS correction capacity(T). Embodiments may maintain this value in an independent register orits value can be derived from RS correction capacity (T).

RS Interleaving Factor: Common practice in the application of RS codingis to encode and decode more than one RS codeword per RS block byinterleaving. Such interleaving is shown, for example, in FIGS. 12 and13 of the above incorporated '546 application. If interleaving ispresent in the configuration, the value of this parameter is a simpleinteger. Because interleaving may be constrained by a particularembodiment, there may be a relatively small limit on the number ofinterleaves. If interleaving is defined for a particular embodiment, thevalues of RS data Length, RS parity length, and RS codeword length mayapply to the respective lengths of the combined interleaves, or thesevalues may reflect the respective lengths of single interleaves. Suchvariations with respect to handling of interleaves are embodimentdependent.

Convolutional Constraint Length: If the convolutional encoder isprogrammable (as is embodiment 300 of FIG. 3), then the value of theconvolutional constraint length (K) may be programmable and stored inthe parameter registers section. If, on the other hand, theconvolutional encoder is configured for a fixed constraint length, thenthere may be no need to register the value of K.

First Convolutional Polynomial: The first one of two convolutionalpolynomials used by the convolutional encoder. See FIG. 3 forillustration and explanation of how convolutional polynomials are usedby a convolutional encoder.

Second Convolutional Polynomial: The second one of two convolutionalpolynomials used by the convolutional encoder. See FIG. 3 forillustration and explanation of how convolutional polynomials are usedby a Convolutional Encoder.

First Puncture Polynomial: The first one of two puncture polynomialsused by the convolutional encoder. See FIG. 3 for illustration andrelated explanation of how puncture polynomials are used by aconvolutional encoder.

Second Puncture Polynomial: The second one of two puncture polynomialsused by the convolutional encoder. See FIG. 3 for illustration andrelated explanation of how puncture polynomials are used by aconvolutional encoder.

Bit Density Setting: Denotes the bit density setting in the currentoperational configuration. Generally, the value is a simple integerrepresenting the number of data bits stored per memory cell. However,when using a fractional bit-per-cell setting (e.g., 3.8), the value canbe other than a simple integer. In such a case, the bit density settingis provided based on encoded values that are interpreted by logic. Forexample, an average bit density setting of 3.5 bits-per-cell can beachieved by programming one-half of the memory cells at 3 bits-per-celland the other half of the memory cells at 4 bits-per-cell. The use ofTCM encoding such as shown in FIG. 2, normally uses at least 3 bits percell for the bit density setting. Fractional bit coding will bediscussed in further detail at an appropriate point hereinafter.

MSB width in TCM: The number of MSB bits in each TCM symbol. The valueof the bit density setting gives the width of the entire TCM symbol,except for fractional bit density settings in which case the TCM valuepresented to each storage cell is the next highest integer value roundedup from the bit density setting. The number of MSB bits, then, is thatproportion of the TCM symbol allocated to the MSB part of the symbol.The MSB width in TCM is the difference between the TCM symbol width andthe number of LSBs. For example at four bits per TCM symbol, with asingle bit for the LSB portion of the symbol, the MSB width as part ofthe TCM width is 4−1=3.

LSB width in TCM: The number of LSB bits in each TCM symbol. the valueof the bit density setting gives the width of the TCM symbol itself,except for fractional bit density settings in which case the TCM valuepresented to each storage cell is the next highest integer value roundedup from the bit density setting. The number of LSB bits, then, is thatproportion of the TCM symbol allocated to the LSB part of the symbol.The LSB Width in TCM is the difference between the TCM symbol width andthe number of MSBs. For example, at four bits per TCM symbol, with 3bits for the LSB portion of the symbol, the LSB width in TCM value is4−3=1.

TCM Codeword Length: Total number of TCM symbols making up an encodeduser data length of bytes according to the configuration defined by aparticular combination of the parameters described above. Because thevalue of TCM codeword length is a function of the RS and convolutionalcode parameters, its can be stored in an independent register as part ofthe parameter registers section.

It should be appreciated that the code efficiency is established by thecombined values of the parameters given by parameter registers section410. Hence, by modifying one or more parameter values in the parameterregisters section, the code efficiency will change in response to thechange in parameter values. Applicants are not aware of any system foruse with nonvolatile memory which provides the flexibility to modify thecode efficiency as quickly as on a codeword-to-codeword basis. Suchflexibility enhances the operation of the system, for example, withrespect to data throughput, memory storage capacity and accommodation ofmemory degradation over time. Generally speaking, higher bit density canbe achieved by adding redundancy. The latter tends to be greater withhigher RS capacity settings and less puncturing. Higher densities aregenerally correlated with higher redundancies. Accommodation of memorydegradation can generally be achieved with higher redundancy but withlesser emphasis on density such that more powerful encoding and decodingsettings can offset the higher tendency to errors exhibited by memorythat is affected by degradation.

Table 1, below, provides simulation examples using parameter values thatestablish the TCM codeword length. The parameters include Bit Density,number of User Bytes, Number of RS interleaves, T (RS correctioncapacity), Number of RS data symbols, Number of RS parity symbols, theconvolutional polynomials, and the puncture polynomials, number of MSBsand the TCM codeword length. Note that the constraint length is the sameas the number of coefficients in the convolutional polynomials. In theseexamples, there are 6 coefficients (bits) in the convolutionalpolynomials, so the constraint length of the convolutionalencoder/decoder is 6.

TABLE 1 Parameter Name Example 1 Example 2 Bit Density 4 3 User DataLength 2048 2048 Number of Interleaves 4 4 Soft T 10 10 RS Data Length1639 1639 RS Parity Length 80 80 First Convolutional Polynomial 110101110101 Second Convolutional Polynomial 101111 101111 First PuncturePolynomial 111111 111111 Second Puncture Polynomial 101010 101010 Numberof MSBs 3 2 TCM Codeword Length 4690 6305

These simulation examples were carried out using a model of encoder anddecoder configurations with the parameters as specified in Table 1. Inview of the details provided here, it is considered that one of ordinaryskill in the art may readily determine the TCM codeword length in termsof its dependence on any influencing parameters.

FIG. 5 illustrates one embodiment of a method, generally indicated bythe reference number 500, that is operable on encoder 20 of FIG. 4 andwhich is equally applicable to other embodiments. For example, method500 is applicable to embodiments that use bit densities other than 4bits per cell.

Method 500 begins at start step 502 and proceeds to setup 504. In step504, the various parameters can be loaded into parameter registerssection 410 of FIG. 4 as well as any other desired register locations.It should be appreciated that some of the parameters may be userspecified such as, for example, User Data length, RS Correction Capacitywhile other parameters such as, for example, RS Parity Length can bedetermined on the basis of user specified parameters. Data flow, ashandled by method 500, begins with user data having units of the userdata typically in 8-bit bytes. The result of method 500, as will beseen, is in the form of TCM-encoded values with each of these valuesrepresenting the target value for one cell of the storage medium. Outputvalues are a function of the configuration of the encoder based on 3bits per cell or more.

At packing step 506, user data of length ‘User Data Length’ (seeparameter registers section 410 in FIG. 4) is converted into ‘RS DataLength’ (see parameter registers section 410 in FIG. 4) made up of RSSymbols. If the ‘User Data Length’ user data symbols do not map into anintegral number of ‘RS Data Length’ RS symbols, bits of known value(i.e. all zeros or all ones) are inserted into an unmapped portion ofthe last RS symbol. Thus, a stream of RS symbols is produced.

Step 508 initiates handling of the stream of RS symbols by initiallydetermining an RS parity value. The RS symbols of length ‘RS DataLength’ obtained from step 506 are encoded by calculating ‘RS ParityLength’ (see parameter registers section 410 in FIG. 4). RS Paritycalculation is well understood by those of ordinary skill in the art. Ifthe configuration specifies more than one interleave via the RSInterleaving Factor (see parameter registers section 410 in FIG. 4), RSparity symbols are calculated for the number of interleaves given in theconfiguration. The output resulting from step 508 is a set of RS symbolswith length ‘RS Data Length’ plus ‘RS Parity Length’.

Step 510 separates the RS symbols resulting from step 508 into an MSBsubset and an LSB subset. The LSB subset is subsequently then processedby step 511 a while the MSB subset is subsequently processed by step 511b. In the exemplary case of 4 bits per cell bit density, MSB and LSBsymbols are created in a proportion to one another in a manner that isconsistent with FIG. 2.

Step 511 a expands the LSB symbols by calculating placeholder positionswhich provide for additions that will be made to the LSB bit stream byconvolutional encoding at step 512. Placeholder positions can bedetermined as described with respect to FIG. 3. The placeholder creationoperation creates empty bit positions in addition to LSB data taken fromthe LSB RS symbols.

Step 511 b packs LSB RS symbols into a set of 3-bit MSB fields, witheach MSB field corresponding to one TCM symbol. At this point, the 3-bitfields have not yet been encoded At the conclusion of packing by step511 c, the total number of 3-bit fields that is created is equal to thetotal number of LSB bits with the addition of the placeholders.

RS symbols resulting from step 508 are packed by step 510 into apre-encode TCM format which inserts the X placeholders seen in the LSBsof FIG. 2. This step converts the set of RS Symbols into a ‘TCM CodewordLength’ (see parameter registers section 410 in FIG. 4) number ofpre-encoded TCM Symbols. “Pre-encode” in this context refers to theformat of the TCM symbols, each with a MSB portion and an LSB portionbut which have not yet been formatted by the MSB mapping section 450 andconvolutional encoding section 300 of FIG. 4. As such, the LSBs are inthe form of a series of un-convolutionally-encoded data bits intermixedwith X placeholders.

Steps 512 and 514 operate cooperatively responsive to step 510. In step512, convolutional encoding is performed (see item 300 in FIGS. 3 and 4)on the ‘TCM Codeword Length’ (see parameter registers section 410 inFIG. 4) LSBs in order to produce ‘TCM Codeword Length’ convolutionallyencoded LSBs. That is, the X designators of the LSBs in FIG. 2 arereplaced by code bits. If the configuration via the ‘Bit DensitySetting’, ‘MSB width in TCM’, and ‘LSB width in TCM’ (see parameterregisters section 410 in FIG. 4) specifies more than one LSB per TCMsymbol, then an appropriate encoder arrangement can be specified withwhich to encode more than one LSB per timing increment. For example,bits b₀ and b₁ of FIG. 2 could both be subject to convolutionalencoding. Step 512 produces a stream of LSB symbols having the number‘TCM Codeword Length’ (see parameter registers section 410 in FIG. 4) asthe number of LSB symbols in the stream. The LSB symbols are of width‘LSB Width in TCM’ (see parameter registers section 410 in FIG. 4). Itshould be appreciated that for the case of one LSB (i.e., b_(o) beingthe only LSB as shown in FIG. 2), the LSB symbols are each made up ofone bit.

In step 514, MSB mapping is performed by transforming the value of eachMSB into a transformed value targeted for TCM encoding. Per FIG. 2, asdescribed above, three-bit MSBs are exemplary and any other suitablegrouping may be used within the scope of the present disclosure. Themapping, in the present example, is from one three-bit value intoanother three-bit value that conforms to the criteria for TCM encoding,as will be understood by one having ordinary skill in the art with thisoverall disclosure in hand. Here, the incoming three-bit values, as anoptional step, are treated as Gray coded values and mapped into binaryvalues (see mapper 450 in FIG. 4). The mapping function, in embodimentsthat fall within the scope of the present disclosure, may be via logicgates or implemented using a look-up table. Other variations may beimplemented for this mapping function. Step 514 produces a stream of MSBsymbols of length ‘TCM Codeword Length’ (see parameter registers section410 in FIG. 4). Each MSB symbol is of a width corresponding to ‘MSBwidth in TCM’ (see parameter registers section 410 in FIG. 4).

In step 516, convolutionally encoded LSBs from step 512 and the mappedMSBs from step 514 are merged into a single stream of encoded TCMsymbols having a length that corresponds to the value of ‘TCM CodewordLength’ (see parameter registers section 410 in FIG. 4). The encoded TCMsymbols are of a width that corresponds to the value of ‘Bit DensitySetting’ (see parameter registers section 410 in FIG. 4). The outputsymbols from this step are target levels to be applied to individualcell locations in the memory. As described above with regard to FIG. 4,an additional scaling of the level may be applied to the encodedsymbols. However, this scaling is optional and may or may not beapplied.

Step 518 converts the target levels to analog values which are writtento individual ones of the memory cells and the method ends at 520 forrestart subject to a subsequent data operation.

FIG. 6 is a block diagram of one embodiment of decoder 22 of FIG. 1produced according to the present disclosure. Generally, decoder 22reverses the transformations of encoder 20 of FIG. 4 in such a way thatnot only is the original user data obtained as a result, but that errorsencountered during the reverse process (decoding) are detected andeliminated. It is considered that other embodiments can be produced byone of ordinary skill in the art in view of this overall disclosure.

The decoder, as shown in FIG. 6, receives TCM symbols on an input 602.TCM symbols are values produced by Analog to Digital conversion ofvoltages sensed as the result of reading the memory. Input 602 receivesthe ADC values since these values are produced by an analog to digitalconverter (not shown) which produces each ADC value responsive toreading a memory cell. The Analog to Digital Conversion function isoften located in NV memory 14, as shown in FIG. 1, however, someembodiments may locate the Analog to Digital Conversion function indecoder 22. While FIG. 6 does not show the memory itself, thearrangement of the memory relative to the decoder is the same as thatshown in FIG. 1 in which there is an input connection relative todecoder 22 from NV memory 14. This connection may be understood toinclude provisions for multiplexing such that the complete extents ofthe memory are accessible. It should be appreciated that the ADC valuesare, in fact, TCM symbols that are stored according to the datastructure of FIG. 2. Thus, a series of ADC values represents a stream ofTCM symbols, as read from the data structure of FIG. 2, and which is tobe subject to decoding. Post-decoding, a stream of user data symbolsemerges on an output 604 on the right side of the figure.

An embodiment of an encoder that is configured in a particular way forstoring data in memory 14 will, upon read back of that data, result inpresenting the decoder with a specific number of TCM symbols each with aspecific number of bits. Controlling parameters for the read back are,therefore, the same as those discussed relative to FIGS. 2 and 4.Although the embodiment of FIG. 6 is exemplary and depicts aconfiguration with four-bit per cell density and one LSB bit per TCMsymbol, one may configure other decoder embodiments, within the scope ofthe teachings herein, to operate with other bit density settings (e.g.,3 bits per cell, or 5 bits per cell), and with more than one LSB bit perTCM symbol. Moreover, embodiments according to the present disclosurecan accommodate many possibilities for the length of an input stream ofTCM symbols. This flexibility is provided, at least in part, byconfiguring a particular embodiment of the decoder responsive toparameters such as, for example, the parameters provided by parameterregister section 410. In this regard, it should be appreciated thatparameter values can change on-the-fly responsive to an incoming symbolstream at least as often as from codeword to codeword for purposes ofeither encoding or decoding, as will be further discussed at anappropriate point hereinafter.

A given decoder embodiment may impose limits on the ranges of somecontrolling parameters such that the decoder is capable of supportingsome data configurations, but not others. Thus, a particular decoderembodiment can be designed to target specific data configurations andmay disregard others. For example, a decoder embodiment may supportthree bit per cell and four bit per cell density settings but not fiveor more bit per cell density settings. Functionality that differs inthis way from one decoder embodiment to another, however, manifests acommon approach to error correction that falls within the scope of theteachings herein and consequently manifests like benefits.

Referring to FIG. 6 a Viterbi Decoder/Detector 610 receives LSBs on anLSB path 612 from the incoming stream of TCM symbols that result fromanalog to digital conversion of cell values read from the memory. Such aViterbi detector will be familiar to one having ordinary skill in thecommunications engineering arts and these descriptions will thereforenot be repeated here for purposes of brevity. Each of the TCM symbolsreceived from the analog to digital conversion have the same structureas the original encoded stream (see FIG. 2), except that additional bitscan be appended to the Least Significant portion of each symbol. Theseadditional bits result from high resolution Analog to Digital conversionand provide additional bits of precision relating to each LSB. In otherwords, the TCM symbols can be read back with a higher bit resolutionthan the resolution at which they were written. These additional bitsare termed “soft bits” and are used by the Viterbi detector to senseeach LSB's value with more resolution than would be possible without thesoft bits. Some embodiments of Viterbi detectors, that use soft bits,may use three or four additional bits, but greater or fewer may be used.It should be appreciated, however, that the use of soft bits is notrequired in order to achieve many of the benefits disclosed herein, buterror correction performance is still further enhanced with the use ofsuch soft bits. An embodiment of the Viterbi detector hardware may bedesigned for one particular decoding configuration or may support morethan one decoding configuration in which case the Viterbi detector canbe parameterized through various registers in parameter registerssection 410, as programmed by microprocessor 412 via firmware 480.Regardless of whether fixed with respect to configuration orprogrammable, a Viterbi detector embodiment includes first and secondconvolutional polynomials and first and second puncture polynomials, allof which are available in parameter registers section 410. Theconvolutional polynomials determine a decoding lattice implemented inthe Viterbi detector, and the puncture polynomials identify a bit subsetin the LSB stream relative to the non-puncture bit stream that wouldhave been generated by a convolutional encoder (convolutional encoder300 of FIGS. 3 and 4, in the present example) in the absence of the useof puncture polynomials. The Viterbi detector produces, as its output, adecoded bit stream that reflects the content of the original LSB streamthat was presented to the encoder. From a practical standpoint, some biterrors will have occurred in the TCM LSB stream, and in keeping with theViterbi detector's behavior as an error-correcting decoder, some ofthese bits will have been corrected by the Viterbi detector. Other biterrors, however, can be passed, and it will then be the task ofsubsequent functions in the decoder to detect and correct thesepass-through errors.

A demapper 620 converts the MSB stream received from analog to digitalconversion on an MSB path 623 back into pre-encode MSBs form. Forexample, if Gray to binary coding was applied by the encoder, thedemapper converts back to Gray code form. The demapper also provides areversal of Level to DAC function 472 of the encoder (see FIG. 4). Itshould be noted that the convolutionally decoded LSBs from Viterbidecoder 610 are directed to a recoder 622, yet to be described and to anLSB buffer 624. Because Level to DAC 472 can provide the option ofscaling of encoded TCM symbols to cell target values, the decodingprocess accuracy can be enhanced when using read back values thatreflect, as near as possible, the original cell targets in order toobtain a suitably error error-free TCM decode. A combination of the MSBsfrom the ADC values and from recoder 622 provide input values to thedemapper that allow such enhanced accuracy. An output 625 of thedemapper is demapped MSBs. LSBs for decoded TCM symbols are taken from aViterbi decoder output 626.

Recoder 622 reconstructs what is intended to be an original encoded bitstream based on the result provided by Viterbi decoder 610. Because someoccasional errors could be present in the Viterbi detector output, arecoded stream at 630 might be an approximation of the original encodedbit stream. It is desired to obtain, as closely as practical, theoriginal encoding of the LSBs of the convolutionally encoded LSBs inorder to find a suitably accurate inverse transformation for the forwardtransformation that was initially performed by Level to DAC 472 of FIG.4. Stated in a slightly different way, Viterbi decoder 610 applies errorcorrection to the incoming LSBs, taken from the ADC values, such thatdecoded LSBs on output 626 of the Viterbi decoder more accuratelyreflect the original error-free LSBs on the encoder side. Recoder 622 isessentially another convolutional encoder 300 (see FIGS. 3 and 4) thatregenerates the LSBs including code bits for use by demapper 620 in moreaccurately regenerating the MSBs. Thus, the original convolutionallyencoded LSBs, including code bits, are provided by recoder 622 todemapper 620 at least within the accuracy limitations of the components.The demapper generates MSBs on output 625 based on the incoming MSBs andthe convolutionally encoded LSBs from recoder 622. The components in theMSB and LSB data path including demapper 620, Viterbi decoder 610 andrecoder 622 may be referred to as a demapping arrangement 641.

An MSB buffer 640 receives the demapped MSBs from the output of demapper620. This latter buffer stages MSB bits in the decoded MSB stream andforwards them to an MSB FIFO 642 as the MSBs are requested responsive toan MSB counter 644. MSB buffer 640 outputs RS symbol-sized groups ofbits to MSB FIFO 642 each time MSB counter 644 requests an MSB RS symbolby counting off 10 bits of accumulation to the MSB buffer. The RS symbolsized groups correspond directly to RS symbols as originally createdduring the encoding function in FIG. 4. The 4-bit per cell configurationillustrated in FIG. 6 utilizes the MSB buffer as being 3 bits wide (asis consistent with FIG. 2), but this is exemplary and other widths maybe established for this buffer (and for the rest of the related datapath) depending on parameter settings for MSB width. Likewise, the RSsymbol width is 10 bits (as seen in FIG. 2) but embodiments with otherRS symbol widths (and other packing arrangements) may be used in theconversions from RS symbols to TCM symbols and from decoded TCM symbolsback to RS symbols.

LSB buffer 624 receives the decoded LSB stream from Viterbi detector610. This buffer stages LSB bits and outputs bits to multiplexer 646whenever an LSB counter 648 requests additional LSB bits. LSB Counter648 controls the operation of multiplexer 646. Whenever the LSB countercounts 10 bits of accumulation into the LSB buffer, the multiplexersends an LSB RS symbol from the LSB buffer through multiplexer 646 to RSDecoder 650. At all other times, MSB RS symbols are accumulated into MSBFIFO. Immediately after an LSB RS symbol is transferred throughmultiplexer 646 to RS Decoder 650, the contents of the MSB FIFO aretransferred through multiplexer 646 to RS Decoder 650. Because multipleMSB RS symbols will comprise this transfer, MSB RS symbols can betransferred out of the MSB Buffer one symbol per clock interval untilall available symbols have been transferred through multiplexer 646 toRS Decoder 650. While in the embodiment of FIG. 6, the LSB buffer is onebit wide, embodiments of widths of greater than one bit may beestablished for this buffer (and for the rest of the related data path)depending upon parameter settings for LSB width.

Under control of MSB counter 644, MSB FIFO (First In First Out) 642receives RS symbols from MSB buffer 640. These symbols, as re-assembledin the MSB FIFO are the same as the RS MSB symbols originally created inencoder 20 of FIG. 4 from the user data input stream and by the actionof RS Encoder 402 (FIG. 4). The MSB FIFO assures that all RS symbolsreturned by the TCM portion of the decoder are reassembled in the samesequence with which they were dispatched to the TCM encoder during theencoding process. Because the MSB data path, in some embodiments,operates at a faster data rate (3 MSB bits per TCM symbol versus lessthan 1 bit per LSB bit with puncturing), the MSB FIFO provides an RSsymbol management function. In the data structure embodiment of FIG. 2,there are points in the sequence where LSB symbol boundaries and MSBsymbol boundaries coincide with TCM symbol boundaries. In the encodingmode, an arbitrary decision can be made whether to transmit an LSB RSsymbol or an MSB RS symbol to the TCM encoder: either the MSB RS symbolmay be sent first or the LSB symbol may be sent first. Either case canbe effective, but in the decoding mode, the reconstruction sequence mustbe exactly the same as the sequence produced by the encoding mode. TheMSB FIFO allows temporary storage of the relatively fast moving MSBsymbols so that MSB RS symbols can be selected in the proper order. Inthis regard, it should be appreciated that the MSB RS symbols cannotsimply be transferred to the RS decoder upon completion since MSB RSsymbols are completed at a faster rate than LSB RS symbols, resulting inan incorrect reconstruction sequence. For example, as described abovewith regard to FIG. 2, RS2-RS5 are completed before RS 1 is completed.Thus, the MSB FIFO would retain RS2-RS5 until RS1 is complete. RS1 istransferred to RS decoder 650 before the transfer of RS2-RS5 to decoder650. The MSB FIFO receives an additional RS MSB symbol from the MSBbuffer each time an RS symbol length of bits is acquired by the MSBbuffer, and sends an RS MSB symbol to multiplexer 646 each timemultiplexer 646 enables the path from the MSB FIFO to RS decoder 650,which occurs under control of the MSB and LSB Counters so as to maintainthe correct sequence of RS symbols at RS decoder 650.

MSB/LSB symbol multiplexer 646 merges reconstructed RS symbols from MSBFIFO 642 and LSB buffer 624 representing both MSB and LSB portions,respectively, of post-decode TCM symbols generated by Viterbi decoder610 and demapper 620. Reconstructed RS symbols are produced by MSB FIFO642 and LSB Buffer 624, as described above. Under control of MSB counter644 and LSB counter 648, 10-bit quantities are selected from the MSBFIFO output and the LSB buffer output and merged into a sequence of RSsymbols that are intended to identically match the sequence originallyproduced by the RS encoding functions of encoder 20 of FIG. 4.

MSB counter 644 is an up counter that counts up until a complete MSB RSSymbol is available from MSB FIFO 642. When a complete MSB RS symbol isavailable, the MSB counter signals multiplexer 646 and the ten bitsymbol is transferred to an RS decoder 650 via the multiplexer. For eachtime increment t, three MSB bits are available to multiplexer 646. TheMSB counter therefore increments by a value of three per time increment.Since each RS MSB symbol, in the present embodiment, is made up of tenbits, the MSB counter will require 4 time increments to initially allowthe accumulation of a complete RS symbol in MSB FIFO 642. At this point,the count is 12. The counter signals the availability of a complete MSBRS symbol to multiplexer 646 and decrements its count by 10 such thatthe current count is 2. Because 4 time increments accumulates a total of12 MSB bits, two bits are left over for allocation to the next MSB RSsymbol. Accordingly, 3 time increments then provide an additional 9 bitssuch that 11 bits are available with 1 of these bits being leftover forthe next MSB RS symbol. At this point, the count is 11. The countersignals the availability of a complete MSB RS symbol to multiplexer 646and decrements its count by 10 such that the current count is 1. With 1bit left over, the next three time increments will provide 9 bits toprovide a complete MSB RS symbol along with the one leftover bit. Atthis point, the count is 10. The counter signals the availability of acomplete MSB RS symbol to multiplexer 646 and decrements its count by 10such that the current count is 0. Accordingly, this process repeats withthe MSB counter decrementing its count by 10 each time it signals theavailability of a complete MSB RS symbol to multiplexer 646. In anembodiment in which there are two MSBs per memory cell, the MSB counterwould increment by 2 per time increment. Similarly, in an embodiment inwhich there are four MSBs per memory cell, the MSB counter wouldincrement by 4 per time increment.

LSB counter 648 counts up in a manner that resembles the count of theMSB counter with the exception that the LSB counter increments by avalue of 1 per each time increment. Thus, the LSB counter indicates theavailability of a complete LSB RS symbol responsive to each ten timeincrements. The LSB counter then resets to zero and counts anew to thevalue of ten. When a complete LSB RS symbol is available, the LSBcounter signals multiplexer 646 and the ten bit symbol is transferred toRS decoder 650 via the multiplexer. When the LSB counter and the MSBcounter simultaneously indicate the availability of an RS symbol,multiplexer 646 gives priority to the LSB RS symbol and takes thatsymbol first in order to reconstruct the original stream of RS symbols.In an embodiment in which there are two LSBs per memory cell, the LSBcounter would increment by 2 per time increment. Similarly, in anembodiment in which there are three LSBs per memory cell, the LSBcounter would increment by a value of 3 per time increment.

A TCM counter 652 is initialized with the value of ‘TCM codeword length’that is equal to a number of TCM symbols 654 that represents the exactnumber of TCM symbols making up the transfer that is about to beperformed. The number of TCM symbols can also be obtained directly fromparameter registers section 410 before the decode begins receiving astream of ADC Values. The count of the TCM counter is decremented by onefor each TCM Symbol decoded. When the count goes to zero, an indicationof the end of the decoding process for the current block is indicated toCPU 412 such that the end of the sequence has been reached. Depending onthe embodiment, this event may enable action by CPU 412 to set upanother encoding sequence that may or may not require parameterregisters section 410 to be re-loaded. It is noted that the currentcount value of the TCM counter as well as the transition to zero, areboth used as control indications by the TCM counter. For example, valuesgreater than zero denote progress of a sequence relative to the totallength denoted by ‘TCM codeword length’, and the transition to zeroindicates sequence completion.

A puncture pattern counter 660 is initialized with a value 661 that iseither directly obtained or derived from the first puncture polynomialand the second puncture polynomial stored in parameter registers section410. The puncture pattern counter value, for decoding purposes, is usedto identify to the Viterbi decoder how to handle each bit in thereceived LSB stream. That is, whether a given bit is a data bit or acode bit. The puncture pattern counter count is also used by recoder 622to reconstruct the recoded LSB stream used by demapper 620.

An RS counter 662 can be initialized with the number of symbols in an RScodeword before decoder 22 begins receiving a stream of ADC Values. Thenumber of symbols can be initialized in an RS symbol number register664, the value of which is either directly obtained from or derived fromvalues stored in parameter registers section 410. Values in parameterregisters section 410, which determine the value to be loaded in RSsymbol number register 664, include the ‘RS data length’ and the ‘RSparity length’, usually as the sum of these two values. These values arein units of RS symbols. As decoder 22 generates a stream of RS symbols,the RS counter counts off RS symbols as they are produced at the outputof MSB FIFO 642 and LSB buffer 624. The RS counter produces a signalthat denotes end of sequence after the last RS symbol has been countedby way of decrementing to zero in the present embodiment. This conditioncan be utilized as a termination control for the RS decoder whichindicates the end of the current transfer. In other embodiments, the MSBcounter, LSB counter and RS symbol counter may be configured to count upor in some suitable combination of up-count and down-count.

RS/LSB limit comparator RS/LSB Limit Comparator 454, in a decodingcontext, is used near the end of a transfer sequence to confirm that thelast bits making up the final LSB RS symbols are zeros. The comparatordetects a transition of the RS counter from values greater than the LSBLimit value to values less than or equal to the LSB Limit value. Thistransition, in turn, causes multiplexer 646 to cooperate in no longertaking bits from LSB buffer 624 and to complete all remaining LSB RSsymbols with zero valued bits, as will be further described below withrespect to LSB limit 490. The components in the LSB and MSB data pathsand supporting components from LSB buffer 624 and MSB buffer 640 up toand including multiplexer 646 may be referred to as an unpackingarrangement 668.

RS decoder 650 receives an RS codeword as the codeword is assembled bymultiplexer 646 and preceding logic. The RS decoding operation canproceed once the RS decoder is in possession of a complete RS codeword.The function of the RS decoder is to decode the RS codewords as they arereceived and to detect and correct any errors that may be present in thereceived RS symbols. The operation of the RS decoder will be understoodby those having ordinary skill in the art with this disclosure in hand.For the moment, it is sufficient to note that the RS decoder is capableof correcting a certain number of symbols within each RS codeword. Aspreviously discussed in this disclosure, an RS codeword is made up of adata portion and a parity portion. The RS decoder uses the parityportion of the RS codeword to detect and remove errors from the dataportion. The RS decoder only needs to return the data portion, whichcorresponds to the original user data submitted to encoder 20 of FIG. 4.The RS decoder produces a stream of RS symbols having a length that isequal to the value of RS data length as identified in parameterregisters section 410. Any errors detected by the RS decoder are appliedto the output symbols before they are asserted to the output.

When the incoming ADC values were stored with interleaving, multiple RScodewords may be presented to the RS decoder in an interleaved manner.In either a single codeword or interleaved codeword configuration, thevalue of the RS interleaving factor in parameter registers section 410defines a particular interleave configuration. RS decoder 650 respondsappropriately by decoding the RS Symbol stream it receives as eithernon-interleaved or as interleaved.

When an interleaved configuration is selected, as evidenced by the RSinterleaving factor value being greater than one, the values of ‘RS DataLength’ and ‘RS Parity Length’ in parameter registers section 410correspond to the interleaved lengths. For example, if the RSinterleaving factor is 4, ‘RS data length’ corresponds to the length offour interleaved data portions, and the value of ‘RS parity length’ isthe length of four parity portions. It is noted that FIGS. 12, 13, 15and 16 of the above incorporated '546 application illustrate a datastructure having four interleaves.

LSB Limit 490 specifies the number of bits in the LSB position that areforced to zero at the end of the decoding sequence. The value of LSBlimit 490, as a count value, is denominated in units of RS symbols andis compared with the RS counter value as the RS counter decrements tozero. The value of the LSB limit is generally a small integer andcorresponds to the number of RS symbols remaining in the sequence at thepoint where the final RS LSB symbol(s) zero stuffing begins. An exampleof this is shown in FIG. 2 where the RS(N−1) symbol occurs. Theoccurrence of RS(N−1) corresponds to the point where the final LSBsymbol bits [in RS(N−7)] are zeros.

The LSB Limit is compared with the value in RS Counter 662 as the RSCounter is decremented for each RS symbol that is supplied to RS Decoder650. After the RS Counter decrements to a value less than or equal tothe LSB Limit, as determined by RS/LSB comparator 454, zeros areinserted into LSB RS symbols sent to the RS Decoder. That is, the pointwhere the equality comparison between the LSB Limit and the RS counteroccurs denotes a change in mode of the way LSB symbols are constructedby beginning zero stuffing. While the RS count is greater than the LSBLimit value, bits in RS LSB symbols are filled-in from bits produced byViterbi decoder 610. After the RS counter becomes equal to or less thanthe Limit count, as determined by RS/LSB comparator 454, the data bitsof additional LSB RS symbols are filled-in with zeros. This continuesuntil the final LSB RS symbol has been filled-in.

RS to user data packing 670 is the final section making up the decodingapparatus. The set of RS symbols of length ‘RS data length’ (seeparameter registers section 410) are converted from RS format to userdata format. In the embodiment of FIG. 7, this conversion is aconversion from 10-bit symbols to 8-bit symbols, as indicated. Ofcourse, if the RS format is different from 10-bits or the user dataformat is different from 8-bits then, the conversion would be from theRS symbol format to the user data symbol format based on the definitionof these widths in the current configuration.

Firmware 480, as executed by microprocessor 412, directs the operationof decoder 22. In particular, the microprocessor is interfaced withparameter registers section 410. The microprocessor can write values tothe registers in enact one of many possible decoding configurations tobe applied to the current stream of ADC values supplied to the decoder.The microprocessor, while executing firmware 480 instructions may beinstructed to modify values at any time the decoder is not activelydecoding a stream of ADC values in order change the programming of thedecoder from one configuration to another. In this way, manycombinations of all the parameters shown in parameter registers section410 may be applied to a particular embodiment of decoder 22. As oneexample, the decoder configuration can be changed to reflect a change inbit density for incoming ADC values.

It is noted that parameter registers section 410 is unchanged withrespect to the various values that are stored, irrespective of whether adecoding data operation or an encoding data operation is to beperformed. From the perspective of firmware 480, however, the variousparameters can be viewed somewhat differently. Hence, the parameterswill be discussed immediately hereinafter, at least in part, within theframework of a decoding operation, although additional details may beprovided for still further explanatory purposes.

User Data Length: The length of user data that must be applied to theoutput after decoding. The unit of this value is normally bytes, so userdata length means the number of bytes in a unit of user data.

RS Correction Capacity (T): The number of symbols errors the RS decoderis capable of successfully detecting and correcting in one RS codeword.If interleaving is applied, then this value applies to a singleinterleave, and the total number of symbols that may be corrected byinterleaving is this number multiplied by the RS interleaving factor.

RS Data Length: This is the number of RS symbols into which a unit ofuser data is transformed. If the number of bits in an RS symbol isdifferent than the number of bits in a user data symbol, then thisnumber is different from the ‘user data length’. In the context of FIG.6, the user data symbol unit is a byte and the RS symbol contains 10bits, so ‘RS data length’ will be less than ‘user data length’ in thiscase by a factor of 8/10.

RS Data Length: The combined length of all interleaves if the RSinterleaving factor is greater than one.

RS Parity Length: The number of RS symbols required for the parityportion of an RS codeword according to the current configuration. Thisvalue may be derived from the RS correction capacity, but may beimplemented in some embodiments as an independent register value.

RS Interleaving Factor: The number of interleaved RS codewords that makeup a length of RS symbols constituting the sum of the ‘RS data length’and ‘RS parity length’ values stored in parameter registers section 410.The number of interleaves is usually a relatively small integer.

Convolutional Constraint Length: The number of bits plus one in theshift register that accepts data in a convolutional encoder (see FIG. 3,shift register 304). Each output bit from the convolutional encoder issome combination of the current input bit to the encoder plus the mostrecent prior bits in the shift register.

First Convolutional Polynomial: One of two convolutional polynomials.The number of coefficients in this polynomial is the same as theconvolutional constraint length. In the decoding case, the FirstConvolutional Polynomial, establishes the interpretation to be appliedby Viterbi detector 610 to those bits in the input stream that occurrelative to application of the First Convolutional polynomial. In someembodiments, this polynomial may be applied to implementation featuresin the Viterbi decoder that select the branch decision configurationcorresponding to the particular Convolutional Polynomial. Implementationof features comprising a Viterbi detector are well understood bypractitioners of ordinary skill in the practical arts. See for example:Wicker, Stephen B Error Control Systems for Digital Communications andStorage, 1995, Prentice-Hall, Chapter 12 (pp. 290-332), which isincorporated herein by reference.

Second Convolutional Polynomial: The second of two convolutionalpolynomials whose coefficients are used to calculate the second one oftwo convolutional encoder output bits using the current input bit andthe shift register. In the decoding case, the Second ConvolutionalPolynomial, establishes the interpretation applied by the Viterbidetector to those bits in the input stream that occur relative toapplication of the Second Convolutional polynomial. In some embodiments,this polynomial may be applied to implementation features in Viterbidecoder 610 that select a branch decision configuration corresponding tothe particular Convolutional Polynomial. Implementation of featurescomprising a Viterbi detector are well understood by practitionershaving ordinary skill in the relevant art. See again, for example:Wicker, Stephen B Error Control Systems for Digital Communications andStorage, 1995, Prentice-Hall, Chapter 12 (pp. 290-332).

First Puncture Polynomial: One of two polynomials that establishes, incooperation with the first convolutional polynomial, the interpretationof each input to Viterbi detector 610 with respect to puncturing. As oneembodiment to select from more than one possible first PuncturePolynomial, the Viterbi detector may be implemented with the capabilityto configure Viterbi decoder operation with respect to selection fromone of multiple possible puncture polynomials in such a way that theappropriate decoding steps are applied to a punctured input stream inorder to reconstruct the appropriate decode sequence. Application ofpuncturing in the context of Viterbi detection is well understood bypractitioners of ordinary skill in the practical arts. See again, forexample, Wicker, Stephen B, Error Control Systems for DigitalCommunications and Storage, 1995 Prentice-Hall, Chapter 12 (pp.290-332). See FIG. 3 for an illustration of how the foregoing is appliedwith respect to a programmable convolutional encoder.

Second Puncture Polynomial: This is the second of two polynomials thatdetermines puncturing. Along with the second convolutional polynomial,this value establishes the interpretation of each input to Viterbidetector 610. As one embodiment to select from more than one possibleSecond Puncture Polynomial, the Viterbi detector may be implemented withthe capability to configure Viterbi decoder operation with respect toselection from one of multiple possible puncture polynomials in such away that the appropriate decoding steps are applied to a punctured inputstream in order to reconstruct the appropriate decode sequence.Application of puncturing in the context of Viterbi detection is wellunderstood by practitioners having ordinary skill in the practical arts.See again, for example, Wicker, Stephen B, Error Control Systems forDigital Communications and Storage, 1995 Prentice-Hall, Chapter 12 (pp.290-332). See FIG. 3 for an illustration of how the foregoing is appliedwith respect to a programmable convolutional encoder.

Bit Density Setting: The number of bits stored per cell in the NVmemory. Many of the other parameters in the parameter registers sectionare determined, at least in part, by the value of the bit densitysetting. It is noted that the advantages attendant to the use of theteachings that have been brought to light herein increase in proportionto increasing bit density at least up to some practical limit withrespect to accuracy in resolving different levels that are stored by amemory cell. The bit density setting is the primary determinant to thewidth of the MSBs, LSBs, and combined TCM symbol data paths in theencoder and the decoder. The decoder of FIG. 6 and the encoder of FIG. 4are exemplary embodiments with respect to the fact that the bit densitysetting is four bits. Other encoder and decoder implementations may use3 bits per cell, in which case the TCM symbol width becomes 3 bitsinstead of 4 bits. Bit density settings greater than 4 may also beapplied. If a Bit Density setting equal to 5 is selected, the MSBportion of each TCM Symbol can be made up of 3 or 4 bits and the LSBsection can be made up of 2 bits or 1 bit, respectively. Greater than 1bit in the LSB portion would then require a convolutional encoder andViterbi decoder capable of handling 2-bit wide encodings. Application ofconvolutional polynomials and puncturing polynomials is analogous to thesingle bit convolutional encoder (see convolutional encoder 300 of FIG.3).

MSB width in TCM: A value that is subordinate to the bit densitysettings (see discussion re bit density setting above). Decoder 22 ofFIG. 6 uses a bit density setting of 4 with the width of the MSB portionof each TCM symbol equal to 3 bits and the width of the LSB portion ofeach TCM symbol equal to 1 bit. Other combinations may be used, asdescribed above.

LSB Bit width in TCM: Another value that is subordinate to the bitdensity setting. Decoder 22 of FIG. 4 uses a bit density setting of 4with the width of the MSB portion of each TCM symbols equal to 3 bitsand the width of the LSB portion of each TCM symbol equal to 1 bit.Other combinations are also suitable, as described, for example withrespect to bit density settings above. Other embodiments andconfigurations may include greater than one LSB as used in the LSBportion of the TCM symbol. In those configurations that do so, the LSBbit width value, as a value programmed by microprocessor 412, specifiesa configuration for which each LSB portion is greater than one. Aparticular embodiment will be capable of a maximum number of LSBs. Someembodiments may only accept a value of one; while others may acceptvalues of 2 or more. It should be appreciated that user specifiedinformation (see, for example, step 504, FIG. 5) can include: User DataLength, RS Capacity (T), RS Interleaving Factor, Bit Density Setting,and the Convolutional and Puncture parameters. These items are allvariables that can cooperate to determine sequence size, and anaccompanying error control overhead. Other or secondary parameters canbe derived from these fundamental parameters. The secondary parameterscan include RS Data Length, RS Parity Length, TCM length, and constraintlength. User selection may not refer to an end user per-se, but doesrefer to configuration variables that may be determined byconsiderations related to mode of use that are established based on someexternal determination that is made, for example, at the time ofmanufacture of a particular system. It should be appreciated that thevarious parameters can be organized and interrelated in any suitablemanner in view of this overall disclosure.

TCM Codeword Length: The total length of a data transfer unit sent toand/or retrieved from the NV memory. In a given storage configuration,this value is constant and does not vary between the storage (i.e.,write) operation and the read operation. It is related to most of theother parameters including ‘user data length’, ‘RS correction capacity’,‘RS data length’, ‘RS parity length’, ‘RS interleaving factor’,‘convolutional constraint length’, ‘convolutional polynomials’, puncturepolynomials and ‘bit density setting’. It is usually stored bymicroprocessor 412 as an independent value, and will control the encoderfunction with respect to transferring exactly the number of TCM valuesin the TCM codeword.

It should be appreciated that the decoding apparatus and associatedmethod that have been brought to light herein each cooperates to provideall of the benefits, at least some of which are described above, withrespect to the ability to change the code efficiency on acodeword-to-codeword basis.

FIG. 7 illustrates one embodiment of a method, generally indicated bythe reference number 700, that is operable on encoder 22 of FIG. 6 andwhich is equally applicable to other embodiments. For example, method700 is applicable to embodiments that use bit densities other than 4bits per cell.

Method 700 begins at start step 702 and proceeds to setup 704. In step704, the various parameters can be loaded into parameter registerssection 410 of FIG. 4 as well as any other desired register locations.It should be appreciated that some of the parameters may be userspecified such as, for example, RS Correction Capacity and theConvolutional Polynomials while other parameters such as, for example,TCM RS Parity Length and TCM Codeword Length can be determined on thebasis of user specified parameters. Data flow, as handled by method 700,begins with ADC values that were read from memory 14 of FIG. 1.

At step 706, ADC values are received from the interface to NV memory(see FIG. 1, item 14). A total of ‘TCM codeword length’ (specified inparameter registers section 410 of FIG. 6) ADC values are received, witheach ADC value corresponding to one TCM symbol. It should be appreciatedthat the ADC values may be different than the encoded TCM symbolsproduced by encoding method 500 of FIG. 5 in that the ADC values reflectsymbols received by the decoder having appended ‘soft bits’. Such aconfiguration may reflect reading the ADC values at a higher resolutionthan the resolution at which the values were initially written into thememory. If soft decoding is supported, the number of soft bits can vary,but some embodiments may use anything from 1 bit to 4 bits. If soft bitsare used in decoding, numerous embodiments may be used within the scopeof the present disclosure. In FIG. 6, which is an embodiment that isprovided by way of example, soft bits may number 3 bits in the receivedADC values such that a total of 7 bits is received. Soft bits aremanifested as “sub-LSB” values where they occupy an arithmeticsignificance less than the significance of the least significant LSB inthe ADC stream. Viterbi decoder 300, if using soft bits, recognizes suchsoft bits and uses them in its decoding process. Soft bits enhancedetection and correction of LSB errors in the bit stream if used. SoftViterbi decoders are well understood in the related practical arts and,therefore, details relating thereto will not be repeated here forpurposes of brevity. The reader in this regard is referred, for example,to Wicker, Stephen B., Error Control Systems for Digital Communicationsand Storage, 1995 Prentice-Hall, pp. 301-305 which is incorporated byreference for additional details.

The result of step 706 is two streams of symbols: a stream of ‘TCMcodeword length’ MSBs each with a width that is defined by the currentconfiguration specified in parameter registers section 410 and a streamof ‘TCM Codeword Length’ LSBs each with width that is similarly definedby the current configuration. If soft bits are used by the currentconfiguration, they appear as a ‘sub-LSB’ extension to the LSB field asdescribed in the previous paragraph.

In step 708, the LSB stream, in one embodiment, is interpreted by anddecoded by Viterbi convolutional decoder 610, as shown in decoderembodiment 22 of FIG. 6. In the present embodiment, the convolutionaldecoder may be reconfigurable by programming in order to be capable ofdecoding different convolutional code configurations defined by the‘convolutional constraint length’ value, the first and secondconvolutional polynomials, and the first and second puncturepolynomials, all of which are available in the parameter registerssection. Decoding results in a stream of ‘TCM Codeword Length’post-decode LSBs. The data bits, as they exist in the decoded bitstream, are bits that the Viterbi decoder selects as the most likelybits to make up the original LSB bit stream which was previouslyreceived by RS to pre-TCM packing step 510 of FIG. 5. Because the streamoperated on by decoding has gone through encoding (FIG. 5) and thenstored into memory 14 (FIG. 1), the LSB bits submitted to Viterbidecoding step 708, after being separated from the ADC values, may haveacquired errors as the stream is interpreted by Viterbi decoding 708.However, the behavior of the decoder is intended to detect and removesome proportion of these errors such that the Viterbi decoder outputexhibits a lower proportion of errors than the number of errors that ispresent at the Viterbi decoder input. In many cases, the Viterbi decoderoutput will be error free, and no additional error correction is thenneeded during the remainder of this process. In any case, however,remaining processing steps are available to remove errors that stillremain following Viterbi decode at 708.

After step 708, the ‘TCM Codeword Length’ post-decode LSB symbols areinputs to a recode step 710 that uses the Viterbi decoded LSBs toattempt to reconstruct a ‘post-encode’ (i.e. encoded) LSB bit stream.That is, recoder step 710 effectively operates as a Viterbi encodingstep to regenerate code bits that were initially inserted duringencoding process 500 of FIG. 5. The recode step is performed to generatea recode stream for use in place of the original ‘pre-decode’ LSB streamentering Viterbi decode step 708 for the reason that the recode streamis more error free as compared to the ‘pre-decode’ stream. As noted, therecoding step resembles a convolutional encoding step in that the sameparameters (convolutional constraint length, first and secondconvolutional polynomials, and first and second puncture polynomials ofparameter registers section 410) are applied in a convolutional encodingsequence. The output from recode step 710 is the decoder's best estimateof the original ‘post-encode’ LSB sequence of ‘TCM Codeword Length’LSBs.

Step 712, as executed by demapper 620 of FIG. 6, operates on MSBsgenerated by step 706 in view of the recode stream that is generated bystep 710. The MSBs, at this point in the decoding process, form the MSBportion of ‘TCM Codeword Length’ specified in parameter register section410. A demapping transformation of MSB values from an encoded form tothe un-encoded form is performed, and is the reverse transformation ofstep 514 of FIG. 5. Step 712 may be implemented, as is the case withstep 514, in terms of logical gates or a look-up table. It should beappreciated that in both the forward and reverse instances, with respectto mapper 450 (FIG. 4) and demapper 620 (FIG. 6) as well as mapping step514 (FIG. 5) and demapping step 712 (FIG. 7), respectively, a one to onerelationship exists between input and output. Every input has one andonly one correct output value for both the mapper and the demapper. Thatis, the relationship between the mapper and demapper are the exactinverse of one another. In the present embodiment, the mapping is abinary to Gray code conversion that can readily be implemented by onehaving ordinary skill in the art in view of this disclosure. Again, thisconversion is performed only if an inverse, Gray code to binaryconversion was applied on the encoder side. The use of the recoded LSBstream achieves an improved result by causing the demapping output tomore closely match the original MSBs of the original encoded MSB streamproduced by step 514 during encoding. The output from step 712 is a setof ‘TCM codeword length’ MSB symbols.

In step 714, the decode LSB stream is received from step 708 and the MSBstream is received from step 712 for purposes of merging into a singlestream of ‘TCM Codeword Length’ post-decode TCM symbols. At this point,the stream is restored to the same format represented in an exemplarycase by FIG. 2 in which a stream of TCM symbols overlays an arrangementof RS Symbols. Further, multiplexer 646 and related operations involvingMSB buffer 640, MSB FIFO 642, LSB buffer 624, MSB counter 644 and LSBcounter 648 of FIG. 6 accommodate merging of the two streams. The resultof step 714 is a stream of TCM symbols, which are output as a sequenceof symbols of width ‘Bit Density Setting’ per parameter registerssection 410.

Here, the ‘TCM Codeword Length’ post-decode TCM symbols are converted toRS representation. The process is the same as the exemplary case shownin FIG. 2. The MSBs and LSBs are converted to their respective RS symbolrepresentation and corresponding bits from both the MSBs and LSBs arereplaced into corresponding RS symbols at bit positions such that theexact arrangement of RS Symbols and bits within them as the originalun-encoded sequence created by the Encode sequence (see FIG. 6) can beobtained, at least within system capabilities.

At step 716, the merged MSB/LSB stream from step 714 is packed into areconstructed stream of pre-decode RS symbols. It is noted that thisstep is implemented through the operation of multiplexer 646 of FIG. 6selectively feeding into RS decoder 650 from the MSB path and the LSBpath. The reconstructed stream resulting from step 716 includes bothuser data (in RS symbol format) and RS parity symbols. The length of theoutput stream is the sum of ‘RS data length’ and ‘RS parity length’ perparameter registers section 410. The difference between this RS symbolstream and the original pre-TCM-encode RS Symbol stream resides in thepotential of the current stream to contain errors remaining responsiveto the write and readback process thus-far. Subsequent steps involvingRS decoding serve to detect and remove erroneous symbols from thecurrent output symbols.

RS decoding includes steps 718 and 720. Initially, step 718 receives theRS symbol stream generated by step 716 in order to calculate a set ofvalues called syndromes. Syndrome calculation starts with the set of RSsymbols of length ‘RS Symbol Length’ plus ‘RS Parity Length’ and usesthese to calculate the syndromes. Syndrome calculation, as an RSdecoding step, is well understood by those of ordinary skill in the artfamiliar with RS decoding. Accordingly, some details will not beprovided for purposes of brevity. It is sufficient to note for presentpurposes that the number of syndromes is always the same as the numberof parity symbols relative to a given size of RS codeword, so theparameter ‘RS parity length’ applies to management of syndromes. Ifinterleaving is selected, the number of parity symbols (and syndromes)corresponds to the value of ‘RS parity length’ divided by ‘RSinterleaving factor’ per parameter registers section 410.

The RS syndromes determined in step 718 are applied in step 720 todetect and correct any erroneous symbols that may be present in each ‘RSData Length’ unit of RS symbols. The ‘RS parity length’ syndromes areused by an algorithmic procedure that calculates locations and values oferrors if any of the syndromes have non-zero values. If all thesyndromes are zero-valued, then the algebraic correction procedure isskipped because a zero value in all syndromes is an indication ofcorrectness (no errors) in all the RS symbol inputs.

If the all zero criterion is not met, the correction process is appliedbefore each stream of ‘RS data length’ is issued as an output of step720. If the all zero criterion is met, the correction procedure isbypassed and the associated stream of ‘RS data length’ symbols is issuedas an output of step 720.

Step 722 receives ‘RS data length’ units of RS symbols from step 722 andconverts the corrected RS symbols to user data format by packing the RSsymbol data into an output stream of user data symbols. It is noted thatstep 722 is a reversal of step 506 of FIG. 5. Here, ‘RS data length’symbols are converted to ‘user data length’ user data symbols, wherethese parameters are specified per parameter registers section 410. Ifthe forward conversion of step 506 of FIG. 5 required insertion ofadditional bits to the final RS symbol, then this step removes the samenumber of bits from the final RS symbol as that symbol is converted backto user data format. Different configurations may be applied in whichboth the RS symbol width and the user data symbol width may vary.Decoder 22 of FIG. 6 shows a configuration of an embodiment of a decoder22 in which the RS symbol size is 10 bits (as indicated leaving RSdecoder 650) and the user data symbol size is 8 bits (as indicated forthe user data leaving RS to user data packer 670). Other configurationsof a given embodiment or other embodiments may employ different sizes ofboth the RS symbols and of the user data symbols.

As noted above, parameters may be changeable on-the-fly in someembodiments for both encoding and decoding. To this end, one embodimentof the parameter register section is shown in FIG. 8 and generallyindicated by the reference number 410′. This embodiment of the parameterregisters section incorporates multiple register banks that are shown asregister sets 0-3. The register sets are connected to a bus 800 whichis, in turn, connected to CPU 412. Each register set is interfaced witha multiplexer 810. Mode select lines 0 and 1, indicated by referencenumbers 812 and 814, respectively, provide for selecting any one of theregister sets using multiplexer 810. Each register set is independentlyprogrammable by CPU 412. Each register set or bank is selectable by CPU412 for purposes of selecting individual ones of the banks on-the-flybased on mode select lines 812 and 814. Thus, configuration changes maybe accomplished with minimal latency (on-the-fly) by disabling an activebank and enabling another bank. As long as the necessary parameterregisters have been loaded into register banks that are to be used,switches between the register banks can be achieved by changing thevalue specified by the mode select lines. It should be appreciated thatany suitable number of register banks may be used for a particularembodiment and that the embodiment of FIG. 8 using four register banksis provided by way of example and is not intended as limiting.

By way of bus 800, CPU 412 can manage any necessary registers responsiveto a change in the operational mode that is selected. The CPU can changethe mode, for example, responsive to changing a parameter such as UserData length and the Convolutional Polynomials, among others and inresponse to the host device. It should be appreciated that changes inparameters can be reflected in this manner as quickly as on acodeword-to-codeword basis. In one embodiment, registers can be used togenerate the bank selection signals and these registers can be writtenby the microprocessor any time it is determined that a change in banksis necessary. Mode changes can occur, for example, based on anarrangement of the memory cells such that one subset of the memory cellsis intended to be written and read according to one set of parametersand a different subset of the memory cells is intended to be written andread according to another set of parameters. Memory cell subsets couldbe handled, in this regard, as partitions that are created by formattinga computer storage device.

With respect to encoder and decoder functions, a temporal considerationin accomplishing on-the-fly configuration changes in embodiments usingbanked architectures resides in the relationship between Bank Select 0and Bank Select 1 state changes and data sequences. In one embodiment,the Bank Select changes would be allowed only during periods of no datasequencing activity. That is, the system is idle or can be made idle.This applies to both external signal activity and internal stateactivity of the affected function(s). As long as both of these are in anidle condition, a rapid change from one register configuration toanother can be accomplished without impact to prior data sequencing, andthe current register change may then apply the selected configuration tothe next data sequence. The potential variety of changes is sosufficiently extensive as to encompass at least changes in User DataLength, RS Capacity, T (which also implies RS Parity Length), RSInterleaving Factor, Convolutional Polynomials, Puncture Polynomials,Bit Density settings, and TCM Codeword length, which is determined by acombination of the foregoing parameters, but can be explicitlyprogrammed into the parameter registers section. It should beappreciated that any number of one or more parameters can be changedsimultaneously, allowing for a degree of flexibility that providessweeping advantages over the state-of-the-art. As described above, thecode efficiency is affected in a direct way by changing parameter valuesand, thereby, as a result of switching between register sets.

Attention is now directed to FIG. 9 which is a flow diagram illustratingone embodiment of a method for operation of a system including thebanked parameter register arrangement of FIG. 8, generally indicated bythe reference number 900. In FIG. 9, parameters in the register banksare shared by both encoder and decoder. However, in other embodiments,the decoder and encoder and decoder can be separately supported byrespective, dedicated register banks. The process begins at start step902. For any particular configuration that is to be supported, at 904,CPU 412 (FIGS. 4 and 6) and firmware 480 establish whether a desiredregister configuration has already been programmed into one of theregister banks. If it is determined that a new configuration is to beused, operation proceeds to step 906 in which a register bank isselected for the new configuration. This selection can be made in anyappropriate manner that, first, may choose a register bank notpreviously programmed with a configuration; if no such unoccupiedregister bank is available, then a decision is made as to which registerbank may be overwritten with the new configuration. After a registerbank has been selected, at 908, it is ascertained whether the chosenregister bank is the active bank. The “active” bank is the bankcurrently chosen to control the encoder and decoder. It should beappreciated that there can only be one “active” register bank. Bydefinition, all register banks that are not active are inactive. Onemight expect that the choice of a register bank would be made only fromamong inactive register banks. But if the choice is made such that theselection is the active register bank, then the process returns to 906to make another choice. If, on the other hand, the register bankselected by 906 is not active then operation advances to 910. At 910,the CPU programs or writes the various parameter registers into theselected bank, with each bank storing a set of each of the values foraforedescribed parameter registers section 410. Once the configurationhas been written to the selected register bank, it is ready for use bythe encoder or decoder. If the CPU determines that the newly programmedconfiguration is to be used during the next encoder or decoder sequence,then the CPU determines at 912 whether the encoder or decoder iscurrently engaged in a previous sequence. If the answer is yes, then theCPU must wait at 914 for the currently activity to complete. Returningbriefly to step 904, in the event that an existing configuration isselected, operation proceeds to step 912.

Once both of the encoder and decoder are determined to be inactive, step916 is entered from either step 914 or from a “No” decision by step 912.Step 916 may first inhibit the encoder and the decoder from engaging ina new data sequence. The method assures that no new sequences areinitiated until the new or next register bank configuration isactivated.

With reference to FIG. 9 in conjunction with FIG. 8, activation of thenext configuration is accomplished at 918 when the CPU changes the valueof bank selects, by using lines 812 and 814, in FIG. 8. If step 916 wasapplied so as to inhibit sequence initiation in either the encoder ordecoder, then step 920 enables the encoder and decoder for newsequences. As soon as both encoder and decoder have been enabled, theprocess is complete at 920. A subsequent configuration change, as may betriggered by the CPU responsive to a request from the host to read fromor write to cells designated by other configuration settings and willcause reentry at step 902.

It should be appreciated that once steps 904) through 914 have beenaccomplished, steps 916 through 920 accomplish configuration changes inonly as much time as the CPU needs to execute an instruction to updatebank selects 812 and 814 (FIG. 8). In other words, the configurationchange is generally made very quickly with little or no effect on actualdata sequencing to follow.

Turning again to FIG. 1, in view of the foregoing, it should beappreciated that nonvolatile memory 14 stores and retrieves data inunits called codewords. Each codeword is the result the encoding processexecuted by encoder 20. When a codeword is retrieved from thenonvolatile memory 14, the decoding process executed by decoder 22returns user data to host computer 12. A codeword is a collection ofmultilevel symbols of a particular length and a particular bit densitysetting, each of which may vary from codeword to codeword. Bit densitysetting determines the number of bits that are stored in each memorycell. In embodiments that store an integer number of bits per memorycell, the contents of one cell constitutes one TCM symbol from thecodeword. The length of the codeword is the number of TCM symbols thatmake up the codeword. By way of example, three codewords arediagrammatically illustrated in FIG. 1 wherein a horizontal lengthrepresents the number of memory cells in each codeword, and a verticalwidth represents the number of bits in each memory cell whichcorresponds to the bit density. A first codeword 960, a second codeword962 and a third codeword 964 are shown. It can be seen that Codeword 962contains relatively fewer symbols than Codeword 960, but containsrelatively greater bits per symbol. Codeword 964 can be seen to containrelatively fewer symbols than either Codeword 960 or Codeword 962, butcontains relatively more bits per symbol than either Codeword 960 orCodeword 962. Hence, it is evident that codewords with varying TCMsymbol width and varying length be concurrently stored in thenonvolatile memory. In this regard, memory 14 can represent a singleintegrated circuit die in which different regions of the die can storedata with different code efficiencies, for example, at differing bitdensities. In another embodiment, memory 14 can be divided among aplurality of integrated memory circuit dies.

Still referring to FIG. 1, a complete data structure, as written intomemory 14, is diagrammatically shown and indicated by the referencenumber 970. It should be appreciated that this data structure wasgenerated responsive to a single write operation containing given userdata and is just as readily readable in a read operation to regeneratethe given user data. Data structure 970, in the present example, is madeup of five codewords that are indicated by the reference numbers 972,974, 976, 978 and 980. Codewords 972, 974, 976 and 978 can each be of adifferent length. In the present example, codewords 972, 976 and 978 areof the same, second length, being made up of the same number of TCMsymbols, while codeword 974 is of a different, second length.Terminating codeword 980 is shorter than the other codewords of datastructure 970 of yet a third length. In this regard, it should beappreciated that it is not necessary in view of the teachings hereinthat every codeword in a transfer be of the same length, for example, byfilling in empty space in the last codeword up to some required codewordlength, since the final or terminating codeword can be ended through atermination or zero-stuffing sequence as described above. Further, as isdemonstrated by data structure 970, successive codewords in the datastructure, even residing in adjacent sets of memory cells in the memory,can store data at different code efficiencies including at different bitdensities. For example, codeword 972 may store data at a bit density of4 bits per memory cell, codeword 974 may store data at a bit density of2 bits per memory cell, codeword 976 may store data at a bit density of3 bits per memory cell, codeword 978 may store data at a bit density of3 bits per memory cell and codeword 980 may store data at a bit densityof bit per memory cell. Essentially no limitation is introduced withregard to the flexibility that is provided in changing code efficiencyfrom codeword to codeword.

Attention is now directed to additional details with respect tofractional bit coding. In general, fractional bit coding can readily beimplemented by taking a group of B input bits and mapping thosecombinations of bits into different level values for a number of cells(C), each having L possible level values. The requirement for themapping is given as:

L^(C)≧2^(B)  (1)

For example, mapping 7 input bits into two cells, each set to one of 12possible levels, will yield 7÷2=3.5 bits per cell.

These teachings can be efficiently implemented within the framework thathas been provided herein. It is noted that a mapping function cannot beapplied by mapper 450 of FIG. 4 in conjunction with the application of afractional bit density. If the desired number of levels L is an evennumber, then the LSB can be handled without modification, for example,in the cases of 3 or 4 bits per cell, with the puncturing andplaceholders unchanged such that the fractional coding is handled withjust the MSBs. In the 3.5 bits per cell example, 5 MSB bits are mappedinto two cells of 12÷2=6 possible levels. It should be appreciated thatthe optional step, described above, of treating incoming MSB values asGray coded should not be applied in conjunction with fractionalencoding.

During packing, wherein the unmapped TCM symbols are generated, thepacking arrangement will vary between 2 MSB bits per TCM symbol (3 bitsper cell mode) and 3 MSB bits (4 bits per cell mode). By doing so, inthe correct proportion over C cells, the desired fractional bit densitywill be attained on average. Again, with this example, the coding blockC is 2 cells, so the packer alternates between 3 MSB bits per TCM symboland 2 MSB bits per TCM symbol. For the two cells, there are 3+2 MSBbits+2 LSB bits=7 user bits, yielding 3.5 bits per cell.

In terms of MSB mapping, groups of B unmapped TCM symbol MSBs are takencollectively and mapped as a group into C sets of L÷2 levels. In thepresent example, 3+2 MSB bits are mapped into 2 cells, each of 6possible level values. For the five MSB bits the 2⁵=32 input values canbe represented by the 6²=36 possible codings of the two memory cellsbased on a mapping from binary values to C cell values. For thisembodiment, there will be four unused combinations of the cell levelvalues which can be mapped to the nearest valid binary input value. Thefour unused combinations of the cell level values are the differencebetween the 6²=36 available levels versus the 2⁵=32 levels actuallyused. In view of the foregoing, one of ordinary skill in the art mayreadily implement a wide variety of fractional bit arrangements.

Turning to FIG. 10 another embodiment of a data structure isdiagrammatically illustrated, generally indicated by the referencenumber 100′, which can be stored in nonvolatile memory 14 of FIG. 1.Data structure 100′ includes an initial portion 102′ and a terminatingportion 104′. It should be appreciated that data structure 100′exemplifies the discussions immediately above. For example, the MSBs,from one TCM symbol to the next, alternate between three MSBs and twoMSBs. Further, comparison of data structure 100′ with data structure 100of FIG. 2 reveals that data structure 100′ is generally identical todata structure 100, except that data structure 100′ implements afractional bit density of 3.5 bits per cell. Accordingly, in view of theteachings that have been brought to light by the present disclosure, oneof ordinary skill in the art may readily implement a wide variety ofsystems and methods that utilize fractional bit encoding.

The foregoing description of the invention has been presented forpurposes of illustration and description. It is not intended to beexhaustive or to limit the invention to the precise form or formsdisclosed, and other modifications and variations may be possible inlight of the above teachings wherein those of skill in the art willrecognize certain modifications, permutations, additions andsub-combinations thereof.

What is claimed is:
 1. As part of a digital system using nonvolatilememory including a plurality of memory cells for storing digital data,an apparatus comprising: a packing arrangement that receives an inputdata stream that is provided by the system for producing an output datastream that is based on a block size for storage in the memory cells andsaid packing arrangement is selectively operable in a first mode basedon one or more input parameters to produce a first block size forstorage in the memory cells and operable at least in a second mode toproduce a second block size that is different than the first block sizeresponsive to a change in said input parameters for selectably changingthe block size during operation thereof.
 2. The apparatus of claim 1where at least one of the first mode and the second mode results in afractional number of bits per cell stored in the memory cells at leaston average per memory cell.
 3. As part of a digital system usingnonvolatile memory including a plurality of memory cells for storingdigital data such that at least some of the memory cells can store morethan one bit, an apparatus comprising: an encoder arrangement thatreceives an input data stream that is provided by the system forproducing an output data stream that is based on a selected number ofbits per cell coding for storage in the memory cells and said encoderarrangement is selectively operable in a first mode based on one or moreinput parameters to produce a first bit density for storage in thememory cells as the selected number of bits per cell and operable atleast in a second mode to produce a second bit density that is differentthan the first bit density responsive to a change in said inputparameters for selectably changing the number of bits per cell codingduring operation thereof.
 4. The apparatus of claim 3 wherein said inputdata stream is configured as a series of codewords and each codeword ismade up of a plurality of symbols to make up a codeword length with eachsymbol representing a value to be stored in one of the memory cells andsaid encoder arrangement is configured for operating in said first modeto produce the first bit density in a first codeword of the series ofcodewords and for operating in the second mode to produce the secondcodeword density in a second codeword of the series of codewords.
 5. Ina digital system using nonvolatile memory including a plurality ofmemory cells for storing digital data such that at least some of thememory cells can store more than one bit, a method comprising:configuring an encoder arrangement for receiving an input data streamthat is provided by the system for producing an output data stream thatis based on a selected number of bits per cell coding for storage in thememory cells and selectively operating said encoder arrangement in afirst mode based on one or more input parameters to produce a first bitdensity for storage in the memory cells as the selected number of bitsper cell and at least in a second mode to produce a second bit densitythat is different than the first bit density responsive to a change insaid input parameters for selectably changing the number of bits percell coding during operation thereof.
 6. As part of a digital systemusing nonvolatile memory including a plurality of memory cells forstoring digital data such that at least some of the memory cells canstore more than one bit, an apparatus comprising: an encoder arrangementthat receives an input data stream that is provided by the system as aseries of input symbols for producing an output data stream that isbased on a selected number of bits per cell coding for storage in thememory cells and said encoder arrangement is reconfigurable based on oneor more input parameters for changing at least the selected number ofbits per cell coding to be stored in the memory cells of the nonvolatilememory.
 7. In a digital system using nonvolatile memory including aplurality of memory cells for storing digital data such that at leastsome of the memory cells can store more than one bit, a methodcomprising: configuring an encoder arrangement for receiving an inputdata stream that is provided by the system as a series of input symbolsfor producing an output data stream that is based on a selected numberof bits per cell coding for storage in the memory cells such that saidencoder arrangement is reconfigurable based on one or more inputparameters for changing at least the selected number of bits per cellcoding to be stored in the memory cells of the nonvolatile memory.
 8. Aspart of a digital system using nonvolatile memory including a pluralityof memory cells for storing digital data such that at least some of thememory cells can store more than one bit, an apparatus comprising: adecoder arrangement that receives a read data stream that is providedresponsive to reading a data structure that is stored in the nonvolatilememory to provide a series of read symbols, containing a user datastream originally encoded during a write operation as part of the datastructure, and stored in a series of the memory cells for reproducingthe user data stream based on a selected one of a number of differentbit densities per cell coding as stored in the series of memory cellsand said decoder arrangement is reconfigurable based on one or moreinput parameters for changing at least the selected one of said bitdensities to match the bit densities as stored in the series of memorycells as part of reproducing said user data stream.
 9. In a digitalsystem using nonvolatile memory including a plurality of memory cellsfor storing digital data such that at least some of the memory cells canstore more than one bit, a method comprising: configuring a decoderarrangement for receiving a read data stream that is provided responsiveto reading a data structure that is stored in the nonvolatile memory toprovide a series of read symbols, containing a user data streamoriginally encoded during a write operation as part of the datastructure, and stored in a series of the memory cells for reproducingthe user data stream based on a selected one of a number of differentbit densities per cell coding as stored in the series of memory cellssuch that said decoder arrangement is reconfigurable based on one ormore input parameters for changing at least the selected one of said bitdensities to match the bit densities as stored in the series of memorycells as part of reproducing said user data stream.
 10. The apparatus ofclaim 4 wherein said encoder/decoder arrangement includes an encoderarrangement for handling said write data, said encoder arrangementcomprising: a Reed Solomon encoder for receiving an input data streamincluding said write data that is provided through the digital system toproduce a Reed Solomon encoded stream that is made up of a series ofReed Solomon symbols; a packing arrangement that receives said ReedSolomon encoded stream for producing a re-blocked output data streamsuch that at least one portion but not all of the re-blocked output datastream is configured to be subject to a code efficiency based on aconvolutional code and said packing arrangement is adapted to modify there-blocked output data stream to support changes in the code efficiencyof the convolutional code which is associated with a predeterminednumber of Reed Solomon symbols in the input stream based on changing oneor more values of one or more input parameters that are provided to thepacking arrangement; and a mapping arrangement for receiving there-blocked output data stream and applying a TCM code to produce a TCMencoded output data stream, said mapper including a convolutionalencoder for convolutionally encoding said portion of the TCM encodedoutput stream according to the code efficiency of said convolutionalcode to support said changes in the code efficiency as based on thevalues of the input parameters to produce a mapped output data streamfor writing to the nonvolatile memory for storage therein as storeddata.
 11. The apparatus of claim 6 wherein said encoder/decoderarrangement includes a decoder arrangement for handling said read data,said decoder arrangement comprising: a demapping arrangement forreceiving a memory output stream based on reading the stored dataincluding said read data from the nonvolatile memory and forconvolutionally decoding the memory output stream according to the codeefficiency to reproduce said TCM encoded output data stream as ademapped output stream based on corresponding ones of the given valuesof the input parameters as provided to the mapping arrangement; anunpacking arrangement for receiving the demapped output stream andreproducing therefrom said Reed Solomon encoded stream based on saidcode efficiency, and said unpacking arrangement is responsive tochanging the code efficiency of the convolutional code associated withsaid predetermined number of Reed Solomon symbols based on correspondingones of the given values of said one or more input parameters asprovided to the packing arrangement; and a Reed Solomon decoder forreceiving the Reed Solomon encoded stream from the unpacking arrangementto decode therefrom a read data stream that includes said input data foruse by the digital system as read data.